aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cachefiles/interface.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/cachefiles/interface.c
parent146a8595c6399ee6ab4b5cc34c0d28aa4835fdc5 (diff)
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/cachefiles/interface.c')
-rw-r--r--fs/cachefiles/interface.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cachefiles/interface.c b/fs/cachefiles/interface.c
index 43eb5592cdea..5088a418ac4d 100644
--- a/fs/cachefiles/interface.c
+++ b/fs/cachefiles/interface.c
@@ -449,14 +449,14 @@ static int cachefiles_attr_changed(struct fscache_object *_object)
449 _debug("discard tail %llx", oi_size); 449 _debug("discard tail %llx", oi_size);
450 newattrs.ia_valid = ATTR_SIZE; 450 newattrs.ia_valid = ATTR_SIZE;
451 newattrs.ia_size = oi_size & PAGE_MASK; 451 newattrs.ia_size = oi_size & PAGE_MASK;
452 ret = notify_change(object->backer, &newattrs); 452 ret = notify_change(object->backer, &newattrs, NULL);
453 if (ret < 0) 453 if (ret < 0)
454 goto truncate_failed; 454 goto truncate_failed;
455 } 455 }
456 456
457 newattrs.ia_valid = ATTR_SIZE; 457 newattrs.ia_valid = ATTR_SIZE;
458 newattrs.ia_size = ni_size; 458 newattrs.ia_size = ni_size;
459 ret = notify_change(object->backer, &newattrs); 459 ret = notify_change(object->backer, &newattrs, NULL);
460 460
461truncate_failed: 461truncate_failed:
462 mutex_unlock(&object->backer->d_inode->i_mutex); 462 mutex_unlock(&object->backer->d_inode->i_mutex);