[Devel] [PATCH RHEL7 COMMIT] ve: remove sync_mutex

Konstantin Khorenko khorenko at virtuozzo.com
Fri Feb 26 05:02:40 PST 2016


The commit is pushed to "branch-rh7-3.10.0-327.3.1-vz7.10.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-327.3.1.vz7.10.13
------>
commit 8e888c8928e971777aba95d3163eedabdf68ff07
Author: Andrey Ryabinin <aryabinin at virtuozzo.com>
Date:   Fri Feb 26 17:02:39 2016 +0400

    ve: remove sync_mutex
    
    sync_mutex in ve_struct doesn't do anything useful and could
    be removed safely.
    
    Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
    Reviewed-by: Vladimir Davydov <vdavydov at 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);


More information about the Devel mailing list