]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
NFS: reformat nfs_mark_delegation_revoked
authorChristoph Hellwig <hch@lst.de>
Wed, 7 Jan 2026 07:27:12 +0000 (08:27 +0100)
committerAnna Schumaker <anna.schumaker@oracle.com>
Tue, 20 Jan 2026 19:49:47 +0000 (14:49 -0500)
Remove a level of indentation for the main code path.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
fs/nfs/delegation.c

index 09e0d3732fda2d216a087a5a5ac309ef7b844151..334bec63b72d664a50782549c051d49133abd817 100644 (file)
@@ -52,12 +52,13 @@ static void __nfs_free_delegation(struct nfs_delegation *delegation)
 static void nfs_mark_delegation_revoked(struct nfs_server *server,
                struct nfs_delegation *delegation)
 {
-       if (!test_and_set_bit(NFS_DELEGATION_REVOKED, &delegation->flags)) {
-               delegation->stateid.type = NFS4_INVALID_STATEID_TYPE;
-               atomic_long_dec(&server->nr_active_delegations);
-               if (!test_bit(NFS_DELEGATION_RETURNING, &delegation->flags))
-                       nfs_clear_verifier_delegated(delegation->inode);
-       }
+       if (test_and_set_bit(NFS_DELEGATION_REVOKED, &delegation->flags))
+               return;
+
+       delegation->stateid.type = NFS4_INVALID_STATEID_TYPE;
+       atomic_long_dec(&server->nr_active_delegations);
+       if (!test_bit(NFS_DELEGATION_RETURNING, &delegation->flags))
+               nfs_clear_verifier_delegated(delegation->inode);
 }
 
 void nfs_put_delegation(struct nfs_delegation *delegation)