From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: linux-nfs-owner@vger.kernel.org Received: from fieldses.org ([174.143.236.118]:47722 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753319Ab2CIW3h (ORCPT ); Fri, 9 Mar 2012 17:29:37 -0500 From: "J. Bruce Fields" To: Al Viro Cc: linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, Christoph Hellwig , "J. Bruce Fields" Subject: [PATCH 4/7] locks: break delegations on unlink Date: Fri, 9 Mar 2012 17:29:31 -0500 Message-Id: <1331332174-22621-4-git-send-email-bfields@redhat.com> In-Reply-To: <20120309222114.GA22423@fieldses.org> References: <20120309222114.GA22423@fieldses.org> Sender: linux-nfs-owner@vger.kernel.org List-ID: From: "J. Bruce Fields" Signed-off-by: J. Bruce Fields --- fs/namei.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index d29b3c4..eb4166f 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -2788,6 +2788,9 @@ static long do_unlinkat(int dfd, const char __user *pathname) error = security_path_unlink(&nd.path, dentry); if (error) goto exit3; + error = break_deleg(inode, O_WRONLY); + if (error) + goto exit3; error = vfs_unlink(nd.path.dentry->d_inode, dentry); exit3: mnt_drop_write(nd.path.mnt); -- 1.7.5.4