]> Pileus Git - ~andy/linux/blobdiff - fs/nfsd/vfs.c
locks: break delegations on any attribute modification
[~andy/linux] / fs / nfsd / vfs.c
index 27ba21b5f383866c8e0444833455ed54c91ea485..94b5f5d2bfedd94be68e7879a8cf8b40d0e3cde3 100644 (file)
@@ -427,7 +427,7 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap,
                        goto out_nfserr;
                fh_lock(fhp);
 
-               host_err = notify_change(dentry, iap);
+               host_err = notify_change(dentry, iap, NULL);
                err = nfserrno(host_err);
                fh_unlock(fhp);
        }
@@ -988,7 +988,11 @@ static void kill_suid(struct dentry *dentry)
        ia.ia_valid = ATTR_KILL_SUID | ATTR_KILL_SGID | ATTR_KILL_PRIV;
 
        mutex_lock(&dentry->d_inode->i_mutex);
-       notify_change(dentry, &ia);
+       /*
+        * Note we call this on write, so notify_change will not
+        * encounter any conflicting delegations:
+        */
+       notify_change(dentry, &ia, NULL);
        mutex_unlock(&dentry->d_inode->i_mutex);
 }