aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/fs/nfs/internal.h
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2025-03-28 13:19:18 -0400
committerTrond Myklebust <trond.myklebust@hammerspace.com>2025-03-28 16:38:02 -0400
commit8d3ca331026a7f9700d3747eed59a67b8f828cdc (patch)
treefa62349f988e7af70efce82517cec4effd27d87e /fs/nfs/internal.h
parentSUNRPC: Don't allow waiting for exiting tasks (diff)
downloadwireguard-linux-8d3ca331026a7f9700d3747eed59a67b8f828cdc.tar.xz
wireguard-linux-8d3ca331026a7f9700d3747eed59a67b8f828cdc.zip
NFS: Don't allow waiting for exiting tasks
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>
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 fae2c7ae4acc..2133b3c20bad 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -912,6 +912,11 @@ static inline u32 nfs_stateid_hash(nfs4_stateid *stateid)
}
#endif
+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) {