linux-stable/fs/nfsd
Al Viro 3c70569e17 new helper: lookup_positive_unlocked()
[ Upstream commit 6c2d4798a8 ]

Most of the callers of lookup_one_len_unlocked() treat negatives are
ERR_PTR(-ENOENT).  Provide a helper that would do just that.  Note
that a pinned positive dentry remains positive - it's ->d_inode is
stable, etc.; a pinned _negative_ dentry can become positive at any
point as long as you are not holding its parent at least shared.
So using lookup_one_len_unlocked() needs to be careful;
lookup_positive_unlocked() is safer and that's what the callers
end up open-coding anyway.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Stable-dep-of: 0d5a4f8f77 ("fs: Fix error checking for d_hash_and_lookup()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-23 10:47:59 +02:00
..
acl.h
auth.c
auth.h
blocklayout.c
blocklayoutxdr.c
blocklayoutxdr.h
cache.h
current_stateid.h
export.c
export.h
fault_inject.c
flexfilelayout.c
flexfilelayoutxdr.c
flexfilelayoutxdr.h
idmap.h
Kconfig
lockd.c
Makefile
netns.h
nfs2acl.c
nfs3acl.c
nfs3proc.c NFSD: Clamp WRITE offsets 2022-02-16 12:51:44 +01:00
nfs3xdr.c new helper: lookup_positive_unlocked() 2023-09-23 10:47:59 +02:00
nfs4acl.c
nfs4callback.c nfsd: under NFSv4.1, fix double svc_xprt_put on rpc_create failure 2023-01-18 11:30:31 +01:00
nfs4idmap.c
nfs4layouts.c nfsd: fix race to check ls_layouts 2023-03-11 16:31:42 +01:00
nfs4proc.c NFSD: Clamp WRITE offsets 2022-02-16 12:51:44 +01:00
nfs4recover.c nfsd: fix a warning in __cld_pipe_upcall() 2019-12-13 08:52:09 +01:00
nfs4state.c nfsd: Fix race to FREE_STATEID and cl_revoked 2023-08-30 16:31:54 +02:00
nfs4xdr.c new helper: lookup_positive_unlocked() 2023-09-23 10:47:59 +02:00
nfscache.c
nfsctl.c treewide: Remove uninitialized_var() usage 2023-08-11 11:45:01 +02:00
nfsd.h
nfsfh.c
nfsfh.h
nfsproc.c NFSD: prevent underflow in nfssvc_decode_writeargs() 2022-04-15 14:14:39 +02:00
nfssvc.c nfsd: Fix message level for normal termination 2020-12-30 11:26:02 +01:00
nfsxdr.c
pnfs.h
state.h nfsd: fix jiffies/time_t mixup in LRU list 2020-02-11 04:34:13 -08:00
stats.c
stats.h
trace.c
trace.h NFSD: Fix offset type in I/O trace points 2022-02-16 12:51:44 +01:00
vfs.c nfsd: apply umask on fs without ACL support 2020-07-09 09:37:11 +02:00
vfs.h nfsd: allow fh_want_write to be called twice 2019-06-15 11:54:07 +02:00
xdr.h NFSD: prevent underflow in nfssvc_decode_writeargs() 2022-04-15 14:14:39 +02:00
xdr3.h
xdr4.h
xdr4cb.h