[Devel] [PATCH RHEL7 COMMIT] ms/dcache: dentry_kill() doesn't need the second argument now

Konstantin Khorenko khorenko at virtuozzo.com
Fri May 27 01:53:14 PDT 2016


The commit is pushed to "branch-rh7-3.10.0-327.18.2.vz7.14.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-327.18.2.vz7.14.8
------>
commit ee59c1fdab24f7faff0681ef672bb8110e395d97
Author: Al Viro <viro at zeniv.linux.org.uk>
Date:   Fri May 27 12:53:14 2016 +0400

    ms/dcache: dentry_kill() doesn't need the second argument now
    
    it's 1 in the only remaining caller.
    
    Signed-off-by: Al Viro <viro at zeniv.linux.org.uk>
    (cherry picked from commit 8cbf74da435d1bd13dbb790f94c7ff67b2fb6af4)
    Signed-off-by: Vladimir Davydov <vdavydov at virtuozzo.com>
---
 fs/dcache.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/fs/dcache.c b/fs/dcache.c
index 7b75b48..ab68597 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -529,8 +529,7 @@ static void __dentry_kill(struct dentry *dentry)
  * If ref is non-zero, then decrement the refcount too.
  * Returns dentry requiring refcount drop, or NULL if we're done.
  */
-static struct dentry *
-dentry_kill(struct dentry *dentry, int unlock_on_failure)
+static struct dentry *dentry_kill(struct dentry *dentry)
 	__releases(dentry->d_lock)
 {
 	struct inode *inode = dentry->d_inode;
@@ -552,10 +551,8 @@ dentry_kill(struct dentry *dentry, int unlock_on_failure)
 	return parent;
 
 failed:
-	if (unlock_on_failure) {
-		spin_unlock(&dentry->d_lock);
-		cpu_relax();
-	}
+	spin_unlock(&dentry->d_lock);
+	cpu_relax();
 	return dentry; /* try again with same dentry */
 }
 
@@ -643,7 +640,7 @@ repeat:
 	return;
 
 kill_it:
-	dentry = dentry_kill(dentry, 1);
+	dentry = dentry_kill(dentry);
 	if (dentry)
 		goto repeat;
 }


More information about the Devel mailing list