]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
NFS: remove NFS_DELEGATION_INODE_FREEING
authorChristoph Hellwig <hch@lst.de>
Wed, 7 Jan 2026 07:27:00 +0000 (08:27 +0100)
committerAnna Schumaker <anna.schumaker@oracle.com>
Tue, 20 Jan 2026 19:49:46 +0000 (14:49 -0500)
This essentially reverts commit 6f9449be53f3 ("NFS: Fix a soft lockup in
the delegation recovery code") because the code walking the per-server
delegation list has been fixed to just skip inodes for which
nfs_delegation_grab_inode fails, instead of having to restart the entire
series in commit f92214e4c312 ("NFS: Avoid unnecessary rescanning of the
per-server delegation list").

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

index 47ecf67ace91e022612f2c4af875108b77d50eab..7b05d661775bb80965175c48ed66771cd9fd5d72 100644 (file)
@@ -308,8 +308,6 @@ static struct inode *nfs_delegation_grab_inode(struct nfs_delegation *delegation
        spin_lock(&delegation->lock);
        if (delegation->inode != NULL)
                inode = igrab(delegation->inode);
-       if (!inode)
-               set_bit(NFS_DELEGATION_INODE_FREEING, &delegation->flags);
        spin_unlock(&delegation->lock);
        return inode;
 }
@@ -643,8 +641,6 @@ restart:
        list_for_each_entry_from_rcu(delegation, &server->delegations, super_list) {
                struct inode *to_put = NULL;
 
-               if (test_bit(NFS_DELEGATION_INODE_FREEING, &delegation->flags))
-                       continue;
                if (!nfs_delegation_need_return(delegation)) {
                        if (nfs4_is_valid_delegation(delegation, 0))
                                prev = delegation;
@@ -765,7 +761,6 @@ void nfs_inode_evict_delegation(struct inode *inode)
                return;
 
        set_bit(NFS_DELEGATION_RETURNING, &delegation->flags);
-       set_bit(NFS_DELEGATION_INODE_FREEING, &delegation->flags);
        nfs_do_return_delegation(inode, delegation, 1);
        nfs_free_delegation(server, delegation);
 }
@@ -1253,9 +1248,7 @@ static int nfs_server_reap_unclaimed_delegations(struct nfs_server *server,
 restart:
        rcu_read_lock();
        list_for_each_entry_rcu(delegation, &server->delegations, super_list) {
-               if (test_bit(NFS_DELEGATION_INODE_FREEING,
-                                       &delegation->flags) ||
-                   test_bit(NFS_DELEGATION_RETURNING,
+               if (test_bit(NFS_DELEGATION_RETURNING,
                                        &delegation->flags) ||
                    test_bit(NFS_DELEGATION_NEED_RECLAIM,
                                        &delegation->flags) == 0)
@@ -1390,9 +1383,7 @@ static int nfs_server_reap_expired_delegations(struct nfs_server *server,
 restart:
        rcu_read_lock();
        list_for_each_entry_rcu(delegation, &server->delegations, super_list) {
-               if (test_bit(NFS_DELEGATION_INODE_FREEING,
-                                       &delegation->flags) ||
-                   test_bit(NFS_DELEGATION_RETURNING,
+               if (test_bit(NFS_DELEGATION_RETURNING,
                                        &delegation->flags) ||
                    test_bit(NFS_DELEGATION_TEST_EXPIRED,
                                        &delegation->flags) == 0 ||
index 46d866adb5c265f4b4a3528e30f1738baa94c946..fef1f4126e8f37b0464ab80b3e9cacdd2c543ad4 100644 (file)
@@ -37,7 +37,6 @@ enum {
        NFS_DELEGATION_RETURNING,
        NFS_DELEGATION_REVOKED,
        NFS_DELEGATION_TEST_EXPIRED,
-       NFS_DELEGATION_INODE_FREEING,
        NFS_DELEGATION_RETURN_DELAYED,
        NFS_DELEGATION_DELEGTIME,
 };
index 6285128e631a5a8d9b1c473f9a15098438bb0faf..18d02b4715bb521a288946d79c15d2c5cafa02ae 100644 (file)
@@ -996,7 +996,6 @@ DEFINE_NFS4_SET_DELEGATION_EVENT(nfs4_detach_delegation);
                { BIT(NFS_DELEGATION_RETURNING), "RETURNING" }, \
                { BIT(NFS_DELEGATION_REVOKED), "REVOKED" }, \
                { BIT(NFS_DELEGATION_TEST_EXPIRED), "TEST_EXPIRED" }, \
-               { BIT(NFS_DELEGATION_INODE_FREEING), "INODE_FREEING" }, \
                { BIT(NFS_DELEGATION_RETURN_DELAYED), "RETURN_DELAYED" })
 
 DECLARE_EVENT_CLASS(nfs4_delegation_event,