summaryrefslogtreecommitdiff
path: root/fs/nfs/internal.h
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2025-03-28 13:19:18 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-05-29 11:02:03 +0200
commitac83bf58f687693c20df74e993921acacd3acdf1 (patch)
tree7adc0bdd6029d2f59393968ea3b4758d0a740558 /fs/nfs/internal.h
parent46a47dc10fa78163bff86d54529c9c9fcbd02e90 (diff)
NFS: Don't allow waiting for exiting tasks
[ Upstream commit 8d3ca331026a7f9700d3747eed59a67b8f828cdc ] Once a task calls exit_signals() it can no longer be signalled. So do not allow it to do killable waits. Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/nfs/internal.h')
-rw-r--r--fs/nfs/internal.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index 8b568a514fd1..1be4be3d4a2b 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -901,6 +901,11 @@ static inline u32 nfs_stateid_hash(const nfs4_stateid *stateid)
NFS4_STATEID_OTHER_SIZE);
}
+static inline bool nfs_current_task_exiting(void)
+{
+ return (current->flags & PF_EXITING) != 0;
+}
+
static inline bool nfs_error_is_fatal(int err)
{
switch (err) {