sync_mutex in ve_struct doesn't do anything useful and could
be removed safely.

Signed-off-by: Andrey Ryabinin <aryabi...@virtuozzo.com>
Reviewed-by: Vladimir Davydov <vdavy...@virtuozzo.com>
---
 fs/sync.c          | 4 ----
 include/linux/ve.h | 1 -
 kernel/ve/ve.c     | 1 -
 3 files changed, 6 deletions(-)

diff --git a/fs/sync.c b/fs/sync.c
index 8119ab4..0eb621f 100644
--- a/fs/sync.c
+++ b/fs/sync.c
@@ -167,8 +167,6 @@ static void sync_filesystems_ve(struct ve_struct *ve, 
struct user_beancounter *u
        LIST_HEAD(sync_list);
        struct sync_sb *ss;
 
-       mutex_lock(&ve->sync_mutex);            /* Could be down_interruptible 
*/
-
        /*
         * We don't need to care about allocating failure here. At least we
         * don't need to skip sync on such error.
@@ -185,8 +183,6 @@ static void sync_filesystems_ve(struct ve_struct *ve, 
struct user_beancounter *u
        }
 
        sync_release_filesystems(&sync_list);
-
-       mutex_unlock(&ve->sync_mutex);
 }
 
 static int __ve_fsync_behavior(struct ve_struct *ve)
diff --git a/include/linux/ve.h b/include/linux/ve.h
index 5d3b5aa..e603d9e 100644
--- a/include/linux/ve.h
+++ b/include/linux/ve.h
@@ -111,7 +111,6 @@ struct ve_struct {
        struct nsproxy __rcu    *ve_ns;
        struct cred             *init_cred;
        struct net              *ve_netns;
-       struct mutex            sync_mutex;
 
        struct list_head        devmnt_list;
        struct mutex            devmnt_mutex;
diff --git a/kernel/ve/ve.c b/kernel/ve/ve.c
index 3b151d5..231f398 100644
--- a/kernel/ve/ve.c
+++ b/kernel/ve/ve.c
@@ -649,7 +649,6 @@ static struct cgroup_subsys_state *ve_create(struct cgroup 
*cg)
 
 do_init:
        init_rwsem(&ve->op_sem);
-       mutex_init(&ve->sync_mutex);
        INIT_LIST_HEAD(&ve->devices);
        INIT_LIST_HEAD(&ve->ve_list);
        INIT_LIST_HEAD(&ve->devmnt_list);
-- 
2.4.10

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to