summaryrefslogtreecommitdiffstats
path: root/fs/inode.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2011-09-20 17:19:26 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-11-09 00:16:44 -0500
commit27ac0ffeac80ba6b9580529568d06144df044366 (patch)
treea2e523716039784271250387d6e94ec4f01daec5 /fs/inode.c
parent146a8595c6399ee6ab4b5cc34c0d28aa4835fdc5 (diff)
downloadtalos-obmc-linux-27ac0ffeac80ba6b9580529568d06144df044366.tar.gz
talos-obmc-linux-27ac0ffeac80ba6b9580529568d06144df044366.zip
locks: break delegations on any attribute modification
NFSv4 uses leases to guarantee that clients can cache metadata as well as data. Cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> Cc: David Howells <dhowells@redhat.com> Cc: Tyler Hicks <tyhicks@canonical.com> Cc: Dustin Kirkland <dustin.kirkland@gazzang.com> Acked-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/inode.c')
-rw-r--r--fs/inode.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/inode.c b/fs/inode.c
index ce48c359ce9e..4bcdad3c9361 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1603,7 +1603,11 @@ static int __remove_suid(struct dentry *dentry, int kill)
struct iattr newattrs;
newattrs.ia_valid = ATTR_FORCE | kill;
- return notify_change(dentry, &newattrs);
+ /*
+ * Note we call this on write, so notify_change will not
+ * encounter any conflicting delegations:
+ */
+ return notify_change(dentry, &newattrs, NULL);
}
int file_remove_suid(struct file *file)
OpenPOWER on IntegriCloud