]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/nfsd/vfs.c
[PATCH] r/o bind mounts: elevate write count for xattr_permission() callers
[linux-2.6-omap-h63xx.git] / fs / nfsd / vfs.c
index 18a4cc9feeb3f6955b5f531755ecba4c23f582f5..626dfd38528ff2c71c13d5d1d40e66efc72ae520 100644 (file)
@@ -2086,6 +2086,9 @@ nfsd_set_posix_acl(struct svc_fh *fhp, int type, struct posix_acl *acl)
        } else
                size = 0;
 
+       error = mnt_want_write(fhp->fh_export->ex_path.mnt);
+       if (error)
+               goto getout;
        if (size)
                error = vfs_setxattr(fhp->fh_dentry, name, value, size, 0);
        else {
@@ -2097,6 +2100,7 @@ nfsd_set_posix_acl(struct svc_fh *fhp, int type, struct posix_acl *acl)
                                error = 0;
                }
        }
+       mnt_drop_write(fhp->fh_export->ex_path.mnt);
 
 getout:
        kfree(value);