From: Trond Myklebust Date: Sun, 24 Aug 2014 18:46:48 +0000 (-0400) Subject: NFSv3: Fix another acl regression X-Git-Tag: v4.14-rc1~6931^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f87d928f6d98644d39809a013a22f981d39017cf;p=platform%2Fkernel%2Flinux-rpi.git NFSv3: Fix another acl regression When creating a new object on the NFS server, we should not be sending posix setacl requests unless the preceding posix_acl_create returned a non-trivial acl. Doing so, causes Solaris servers in particular to return an EINVAL. Fixes: 013cdf1088d72 (nfs: use generic posix ACL infrastructure,,,) Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1132786 Cc: stable@vger.kernel.org # 3.14+ Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/nfs3acl.c b/fs/nfs/nfs3acl.c index d0fec26..24c6898 100644 --- a/fs/nfs/nfs3acl.c +++ b/fs/nfs/nfs3acl.c @@ -129,7 +129,10 @@ static int __nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl, .rpc_argp = &args, .rpc_resp = &fattr, }; - int status; + int status = 0; + + if (acl == NULL && (!S_ISDIR(inode->i_mode) || dfacl == NULL)) + goto out; status = -EOPNOTSUPP; if (!nfs_server_capable(inode, NFS_CAP_ACLS))