locks: break delegations on any attribute modification

NFSv4 uses leases to guarantee that clients can cache metadata as well
as data.

Cc: Mikulas Patocka <[email protected]>
Cc: David Howells <[email protected]>
Cc: Tyler Hicks <[email protected]>
Cc: Dustin Kirkland <[email protected]>
Acked-by: Jeff Layton <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
J. Bruce Fields 2011-09-20 17:19:26 -04:00 • committed by Al Viro
commit 27ac0ffeac
10 changed files with 69 additions and 17 deletions

View file

@ -407,7 +407,7 @@ again:
/*printk("HPFS: truncating file before delete.\n");*/
newattrs.ia_size = 0;
newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME;
err = notify_change(dentry, &newattrs);
err = notify_change(dentry, &newattrs, NULL);
put_write_access(inode);
if (!err)
goto again;