From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cong Wang Subject: [Patch 3.14 stable 14/16] dentry_kill() doesn't need the second argument now Date: Thu, 6 Nov 2014 11:37:18 -0800 Message-ID: <1415302640-5876-15-git-send-email-xiyou.wangcong@gmail.com> References: <1415302640-5876-1-git-send-email-xiyou.wangcong@gmail.com> Cc: viro@zeniv.linux.org.uk, gregkh@linuxfoundation.org, linux-fsdevel@vger.kernel.org To: stable@vger.kernel.org Return-path: Received: from mail-pa0-f50.google.com ([209.85.220.50]:51888 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751761AbaKFTh6 (ORCPT ); Thu, 6 Nov 2014 14:37:58 -0500 In-Reply-To: <1415302640-5876-1-git-send-email-xiyou.wangcong@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: From: Al Viro it's 1 in the only remaining caller. Signed-off-by: Al Viro (cherry picked from commit 8cbf74da435d1bd13dbb790f94c7ff67b2fb6af4) --- fs/dcache.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/fs/dcache.c b/fs/dcache.c index 1b9f89f..bb72e82 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -499,8 +499,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; @@ -522,10 +521,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 */ } @@ -614,7 +611,7 @@ void dput(struct dentry *dentry) return; kill_it: - dentry = dentry_kill(dentry, 1); + dentry = dentry_kill(dentry); if (dentry) goto repeat; } -- 1.8.3.1