nfs: remove empty if statement from nfs3_prepare_get_acl
authorUros Bizjak <ubizjak@gmail.com>
Wed, 30 Nov 2022 15:12:31 +0000 (16:12 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 8 Apr 2023 20:45:36 +0000 (13:45 -0700)
Remove empty if statement from nfs3_prepare_get_acl and update comment to
follow the one from the referred fs/posix_acl.c:get_acl().

No functional change intended.

Link: https://lkml.kernel.org/r/20221130151231.3654-1-ubizjak@gmail.com
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Trond Myklebust <trond.myklebust@hammerspace.com>
Cc: Anna Schumaker <anna@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/nfs/nfs3acl.c

index 1247f544a440e41303637a252d864eeb97b990fb..ccc4da54cc93a37b18140c3a3425acab0f48fa4f 100644 (file)
@@ -21,9 +21,8 @@ static void nfs3_prepare_get_acl(struct posix_acl **p)
 {
        struct posix_acl *sentinel = uncached_acl_sentinel(current);
 
-       if (cmpxchg(p, ACL_NOT_CACHED, sentinel) != ACL_NOT_CACHED) {
-               /* Not the first reader or sentinel already in place. */
-       }
+       /* If the ACL isn't being read yet, set our sentinel. */
+       cmpxchg(p, ACL_NOT_CACHED, sentinel);
 }
 
 static void nfs3_complete_get_acl(struct posix_acl **p, struct posix_acl *acl)