Skip to contentSkip to conversation

Spurious -EEXIST from NFSv3

PATCH In review Michael Stoler 4 participants 9 messages Nov 19, 2025 – Nov 20, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

I’m having an issue with an NFS driver based on Linux 5.15.147. The
function nfs_verifier_is_delegated() spuriously returns true for NFSv3 file inside nfs_do_lookup_revalidate(). This causes the d_revalidate method to return true for a removed file, which in turn leads to an -EEXIST error during exclusive creation of a non-existent file.

It appears that the root cause is an initialization races or an
uninitialized d_time value. The attached patch resolves the issue, but is there a more graceful or proper solution?

Regards,

Michael Stoler

fs/nfs/dir.c +1 -1
@@ -1602,7 +1602,7 @@ nfs_do_lookup_revalidate(struct inode *dir, struct dentry *dentry,
 		goto out_bad;
 	}
 
-	if (nfs_verifier_is_delegated(dentry))
+	if (nfs_verifier_is_delegated(dentry) && NFS_PROTO(inode)->version > 3)
 		return nfs_lookup_revalidate_delegated(dir, dentry, inode);
 
 	/* Force a full look up iff the parent directory has changed */
maintainer
#1 lore raw
Quoted 17 lines · Michael Stoler


You don't often get email from [email protected]. Learn why this is important

    I’m having an issue with an NFS driver based on Linux 5.15.147. The function nfs_verifier_is_delegated() spuriously returns true for NFSv3 file inside nfs_do_lookup_revalidate(). This causes the d_revalidate method to return true for a removed file, which in turn leads to an -EEXIST error during exclusive creation of a non-existent file.

Quoted 4 lines

   It appears that the root cause is an initialization races or an uninitialized d_time value. The attached patch resolves the issue, but is there a more graceful or proper solution?

That patch is incorrect. The verifier must be initialised for all visible dentries, irrespective of the NFS version. Let me see if I can come up with something.

Signature · 3 lines
Trond Myklebust
Linux NFS client maintainer, Hammerspace
[email protected], [email protected]
maintainer
#2 lore raw

cover Fix verifier initialisation races for dentries

From: Trond Myklebust <[email protected]>

Michael Stoler reports seeing an issue in which an uninitialised verifier on a dentry is causing an incorrect revalidation. This again is causing him to see a removed file as being still present during an exclusive create.
The fix should be to ensure that all verifiers are initialised before calling d_splice_alias().

Trond Myklebust (3):
NFS: Initialise verifiers for visible dentries in readdir and lookup
NFS: Initialise verifiers for visible dentries in nfs_atomic_open()
NFS: Initialise verifiers for visible dentries in
_nfs4_open_and_get_state

 fs/nfs/dir.c      |  8 +++++---
 fs/nfs/nfs4proc.c | 27 ++++++++++++++-------------
 2 files changed, 19 insertions(+), 16 deletions(-)
Signature · 1 line
2.51.1
maintainer
#3 lore raw

PATCH 1/3 NFS: Initialise verifiers for visible dentries in readdir and lookup

From: Trond Myklebust <[email protected]>

Ensure that the verifiers are initialised before calling d_splice_alias() in both nfs_prime_dcache() and nfs_lookup().

Fixes a1147b8281bd ("NFS: Fix up directory verifier races")
---
 fs/nfs/dir.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
fs/nfs/dir.c +4 -2
index d557b0443e8b..2eead7e85be5 100644
@@ -789,16 +789,17 @@ void nfs_prime_dcache(struct dentry *parent, struct nfs_entry *entry,
 		goto out;
 	}
 
+	nfs_set_verifier(dentry, dir_verifier);
 	inode = nfs_fhget(dentry->d_sb, entry->fh, entry->fattr);
 	alias = d_splice_alias(inode, dentry);
 	d_lookup_done(dentry);
 	if (alias) {
 		if (IS_ERR(alias))
 			goto out;
+		nfs_set_verifier(alias, dir_verifier);
 		dput(dentry);
 		dentry = alias;
 	}
-	nfs_set_verifier(dentry, dir_verifier);
 	trace_nfs_readdir_lookup(d_inode(parent), dentry, 0);
 out:
 	dput(dentry);
@@ -1994,13 +1995,14 @@ struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, unsigned in
 	nfs_lookup_advise_force_readdirplus(dir, flags);
 
 no_entry:
+	nfs_set_verifier(dentry, dir_verifier);
 	res = d_splice_alias(inode, dentry);
 	if (res != NULL) {
 		if (IS_ERR(res))
 			goto out;
+		nfs_set_verifier(res, dir_verifier);
 		dentry = res;
 	}
-	nfs_set_verifier(dentry, dir_verifier);
 out:
 	trace_nfs_lookup_exit(dir, dentry, flags, PTR_ERR_OR_ZERO(res));
 	nfs_free_fattr(fattr);
Signature · 1 line
2.51.1
maintainer
#4 lore raw

PATCH 2/3 NFS: Initialise verifiers for visible dentries in nfs_atomic_open()

In reply to Trond Myklebust

From: Trond Myklebust <[email protected]>

Ensure that the verifiers are initialised before calling d_splice_alias() in nfs_atomic_open().

Fixes 809fd143de88 ("NFSv4: Ensure nfs_atomic_open set the dentry verifier on ENOENT")
---
 fs/nfs/dir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfs/dir.c +1 -1
index 2eead7e85be5..3b8250ee0141 100644
@@ -2144,12 +2144,12 @@ int nfs_atomic_open(struct inode *dir, struct dentry *dentry,
 		d_drop(dentry);
 		switch (err) {
 		case -ENOENT:
-			d_splice_alias(NULL, dentry);
 			if (nfs_server_capable(dir, NFS_CAP_CASE_INSENSITIVE))
 				dir_verifier = inode_peek_iversion_raw(dir);
 			else
 				dir_verifier = nfs_save_change_attribute(dir);
 			nfs_set_verifier(dentry, dir_verifier);
+			d_splice_alias(NULL, dentry);
 			break;
 		case -EISDIR:
 		case -ENOTDIR:
Signature · 1 line
2.51.1
maintainer
#5 lore raw

PATCH 3/3 NFS: Initialise verifiers for visible dentries in _nfs4_open_and_get_state

In reply to Trond Myklebust

From: Trond Myklebust <[email protected]>

Ensure that the verifiers are initialised before calling d_splice_alias() in _nfs4_open_and_get_state().

Fixes cf5b4059ba71 ("NFSv4: Fix races between open and dentry revalidation")
---
 fs/nfs/nfs4proc.c | 27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)
fs/nfs/nfs4proc.c +14 -13
index 93c6ce04332b..54595983525d 100644
@@ -3174,18 +3174,6 @@ static int _nfs4_open_and_get_state(struct nfs4_opendata *opendata,
 	if (opendata->o_res.rflags & NFS4_OPEN_RESULT_PRESERVE_UNLINKED)
 		set_bit(NFS_INO_PRESERVE_UNLINKED, &NFS_I(state->inode)->flags);
 
-	dentry = opendata->dentry;
-	if (d_really_is_negative(dentry)) {
-		struct dentry *alias;
-		d_drop(dentry);
-		alias = d_splice_alias(igrab(state->inode), dentry);
-		/* d_splice_alias() can't fail here - it's a non-directory */
-		if (alias) {
-			dput(ctx->dentry);
-			ctx->dentry = dentry = alias;
-		}
-	}
-
 	switch(opendata->o_arg.claim) {
 	default:
 		break;
@@ -3196,7 +3184,20 @@ static int _nfs4_open_and_get_state(struct nfs4_opendata *opendata,
 			break;
 		if (opendata->o_res.delegation.type != 0)
 			dir_verifier = nfs_save_change_attribute(dir);
-		nfs_set_verifier(dentry, dir_verifier);
+	}
+	nfs_set_verifier(dentry, dir_verifier);
+
+	dentry = opendata->dentry;
+	if (d_really_is_negative(dentry)) {
+		struct dentry *alias;
+		d_drop(dentry);
+		alias = d_splice_alias(igrab(state->inode), dentry);
+		/* d_splice_alias() can't fail here - it's a non-directory */
+		if (alias) {
+			dput(ctx->dentry);
+			nfs_set_verifier(alias, dir_verifier);
+			ctx->dentry = dentry = alias;
+		}
 	}
 
 	/* Parse layoutget results before we check for access */
Signature · 1 line
2.51.1
#6 lore raw

Re: [PATCH 3/3] NFS: Initialise verifiers for visible dentries in _nfs4_open_and_get_state

Hi Trond,

Quoted 36 lines · Trond Myklebust

From: Trond Myklebust <[email protected]>

Ensure that the verifiers are initialised before calling d_splice_alias() in _nfs4_open_and_get_state().

Fixes cf5b4059ba71 ("NFSv4: Fix races between open and dentry revalidation")
---
 fs/nfs/nfs4proc.c | 27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)
fs/nfs/nfs4proc.c +0 -12
index 93c6ce04332b..54595983525d 100644
@@ -3174,18 +3174,6 @@ static int _nfs4_open_and_get_state(struct nfs4_opendata *opendata,
 	if (opendata->o_res.rflags & NFS4_OPEN_RESULT_PRESERVE_UNLINKED)
 		set_bit(NFS_INO_PRESERVE_UNLINKED, &NFS_I(state->inode)->flags);
 
-	dentry = opendata->dentry;
-	if (d_really_is_negative(dentry)) {
-		struct dentry *alias;
-		d_drop(dentry);
-		alias = d_splice_alias(igrab(state->inode), dentry);
-		/* d_splice_alias() can't fail here - it's a non-directory */
-		if (alias) {
-			dput(ctx->dentry);
-			ctx->dentry = dentry = alias;
-		}
-	}
-
 	switch(opendata->o_arg.claim) {
 	default:
 		break;

fs/nfs/nfs4proc.c static int _nfs4_open_and_get_state(struct nfs4_opendata *opendata, · line 3188

Quoted 6 lines
fs/nfs/nfs4proc.c +2 -1
@@ -3196,7 +3184,20 @@ static int _nfs4_open_and_get_state(struct nfs4_opendata *opendata,
 			break;
 		if (opendata->o_res.delegation.type != 0)
 			dir_verifier = nfs_save_change_attribute(dir);
-		nfs_set_verifier(dentry, dir_verifier);
+	}
+	nfs_set_verifier(dentry, dir_verifier);

Isn't 'dentry' uninitialized here? As far as I can tell, it gets set for the first time in the very next statement.

Thanks,
Anna

Quoted 15 lines
fs/nfs/nfs4proc.c +12 -0
+
+	dentry = opendata->dentry;
+	if (d_really_is_negative(dentry)) {
+		struct dentry *alias;
+		d_drop(dentry);
+		alias = d_splice_alias(igrab(state->inode), dentry);
+		/* d_splice_alias() can't fail here - it's a non-directory */
+		if (alias) {
+			dput(ctx->dentry);
+			nfs_set_verifier(alias, dir_verifier);
+			ctx->dentry = dentry = alias;
+		}
 	}
 
 	/* Parse layoutget results before we check for access */
maintainer
#7 lore raw

Re: [PATCH 3/3] NFS: Initialise verifiers for visible dentries in _nfs4_open_and_get_state

Quoted 49 lines · Anna Schumaker

Hi Trond,

Quoted 46 lines · Trond Myklebust

From: Trond Myklebust <[email protected]>

Ensure that the verifiers are initialised before calling d_splice_alias() in _nfs4_open_and_get_state().

Fixes cf5b4059ba71 ("NFSv4: Fix races between open and dentry

revalidation")

---
 fs/nfs/nfs4proc.c | 27 ++++++++++++++-------------

 1 file changed, 14 insertions(+), 13 deletions(-)
fs/nfs/nfs4proc.c +0 -0
index 93c6ce04332b..54595983525d 100644
@@ -3174,18 +3174,6 @@ static int _nfs4_open_and_get_state(struct
 nfs4_opendata *opendata,

  if (opendata->o_res.rflags & NFS4_OPEN_RESULT_PRESERVE_UNLINKED) set_bit(NFS_INO_PRESERVE_UNLINKED, &NFS_I(state-

Quoted 1 line

inode)->flags);

fs/nfs/nfs4proc.c +0 -5
-	dentry = opendata->dentry;
-	if (d_really_is_negative(dentry)) {
-		struct dentry *alias;
-		d_drop(dentry);
-		alias = d_splice_alias(igrab(state->inode),

dentry);

fs/nfs/nfs4proc.c +0 -1
-		/* d_splice_alias() can't fail here - it's a non-

directory */

fs/nfs/nfs4proc.c +0 -6
-		if (alias) {
-			dput(ctx->dentry);
-			ctx->dentry = dentry = alias;
-		}
-	}
-

  switch(opendata->o_arg.claim) {
  default:
  break;

fs/nfs/nfs4proc.c +0 -0
@@ -3196,7 +3184,20 @@ static int _nfs4_open_and_get_state(struct
 nfs4_opendata *opendata,
  			break;
  		if (opendata->o_res.delegation.type != 0)

  dir_verifier =

Quoted 8 lines

fs/nfs/nfs4proc.c static int _nfs4_open_and_get_state(struct nfs4_opendata *opendata, · line 3188

Quoted 4 lines

nfs_save_change_attribute(dir);

fs/nfs/nfs4proc.c +2 -1
-		nfs_set_verifier(dentry, dir_verifier);
+	}
+	nfs_set_verifier(dentry, dir_verifier);

Isn't 'dentry' uninitialized here? As far as I can tell, it gets set for the first time
in the very next statement.

D'oh! I wonder why the compiler let that pass?
Anyhow, yes, the nfs_set_verifier() call needs to be moved one line down.

Quoted 21 lines

Thanks,
Anna

Quoted 17 lines
fs/nfs/nfs4proc.c +6 -0
+
+	dentry = opendata->dentry;
+	if (d_really_is_negative(dentry)) {
+		struct dentry *alias;
+		d_drop(dentry);
+		alias = d_splice_alias(igrab(state->inode),

dentry);

fs/nfs/nfs4proc.c +1 -0
+		/* d_splice_alias() can't fail here - it's a non-

directory */

fs/nfs/nfs4proc.c +5 -0
+		if (alias) {
+			dput(ctx->dentry);
+			nfs_set_verifier(alias, dir_verifier);
+			ctx->dentry = dentry = alias;
+		}

  }

  /* Parse layoutget results before we check for access */

Signature · 3 lines
Trond Myklebust
Linux NFS client maintainer, Hammerspace
[email protected], [email protected]
#8 lore raw

Re: [PATCH 3/3] NFS: Initialise verifiers for visible dentries in _nfs4_open_and_get_state

In reply to Trond Myklebust
kernel test robot noticed the following build warnings:

Hi Trond,

kernel test robot noticed the following build warnings:

[auto build test WARNING on trondmy-nfs/linux-next]
[also build test WARNING on linus/master v6.18-rc6 next-20251119] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Trond-Myklebust/NFS-Initialise-verifiers-for-visible-dentries-in-readdir-and-lookup/20251119-222523
base:   git://git.linux-nfs.org/projects/trondmy/linux-nfs.git linux-next
patch link:    https://lore.kernel.org/r/4c4b51c67f7b38e4df4cb389007058e37ade0d14.1763560328.git.trond.myklebust%40hammerspace.com
patch subject: [PATCH 3/3] NFS: Initialise verifiers for visible dentries in _nfs4_open_and_get_state
config: hexagon-randconfig-6002-20251120 (https://download.01.org/0day-ci/archive/20251120/[email protected]/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 9e9fe08b16ea2c4d9867fb4974edf2a3776d6ece)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251120/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

>> fs/nfs/nfs4proc.c:3188:19: warning: variable 'dentry' is uninitialized when used here [-Wuninitialized]
    3188 |         nfs_set_verifier(dentry, dir_verifier);
         |                          ^~~~~~
   fs/nfs/nfs4proc.c:3152:23: note: initialize the variable 'dentry' to silence this warning
    3152 |         struct dentry *dentry;
         |                              ^
         |                               = NULL

1 warning generated.

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for OF_GPIO
Depends on [n]: GPIOLIB [=y] && OF [=n] && HAS_IOMEM [=y]
Selected by [y]:
- GPIO_TB10X [=y] && GPIOLIB [=y] && HAS_IOMEM [=y] && (ARC_PLAT_TB10X || COMPILE_TEST [=y])
WARNING: unmet direct dependencies detected for MFD_STMFX
Depends on [n]: HAS_IOMEM [=y] && I2C [=y] && OF [=n]
Selected by [y]:
- PINCTRL_STMFX [=y] && PINCTRL [=y] && I2C [=y] && OF_GPIO [=y] && HAS_IOMEM [=y]
WARNING: unmet direct dependencies detected for GPIO_SYSCON
Depends on [n]: GPIOLIB [=y] && HAS_IOMEM [=y] && MFD_SYSCON [=y] && OF [=n]
Selected by [y]:
- GPIO_SAMA5D2_PIOBU [=y] && GPIOLIB [=y] && HAS_IOMEM [=y] && MFD_SYSCON [=y] && OF_GPIO [=y] && (ARCH_AT91 || COMPILE_TEST [=y])

vim +/dentry +3188 fs/nfs/nfs4proc.c

aa53ed541a1fec Jeff Layton       2007-06-05  3146  
c21443c2c792cd Trond Myklebust   2013-02-07  3147  static int _nfs4_open_and_get_state(struct nfs4_opendata *opendata,
d564d2c4c2445c ChenXiaoSong      2022-09-23  3148  		struct nfs_open_context *ctx)
c21443c2c792cd Trond Myklebust   2013-02-07  3149  {
c21443c2c792cd Trond Myklebust   2013-02-07  3150  	struct nfs4_state_owner *sp = opendata->owner;
c21443c2c792cd Trond Myklebust   2013-02-07  3151  	struct nfs_server *server = sp->so_server;
275bb307865a31 Trond Myklebust   2013-05-29  3152  	struct dentry *dentry;
c21443c2c792cd Trond Myklebust   2013-02-07  3153  	struct nfs4_state *state;
1bf85d8c987564 Trond Myklebust   2019-06-27  3154  	fmode_t acc_mode = _nfs4_ctx_to_accessmode(ctx);
cf5b4059ba7197 Trond Myklebust   2020-02-05  3155  	struct inode *dir = d_inode(opendata->dir);
cf5b4059ba7197 Trond Myklebust   2020-02-05  3156  	unsigned long dir_verifier;
c21443c2c792cd Trond Myklebust   2013-02-07  3157  	int ret;
c21443c2c792cd Trond Myklebust   2013-02-07  3158  
cf5b4059ba7197 Trond Myklebust   2020-02-05  3159  	dir_verifier = nfs_save_change_attribute(dir);
c21443c2c792cd Trond Myklebust   2013-02-07  3160  
3b65a30df9b3f1 Fred Isaman       2016-09-19  3161  	ret = _nfs4_proc_open(opendata, ctx);
dca780016dab84 Trond Myklebust   2014-10-23  3162  	if (ret != 0)
c21443c2c792cd Trond Myklebust   2013-02-07  3163  		goto out;
c21443c2c792cd Trond Myklebust   2013-02-07  3164  
ae55e59da0e401 Trond Myklebust   2018-05-22  3165  	state = _nfs4_opendata_to_nfs4_state(opendata);
c21443c2c792cd Trond Myklebust   2013-02-07  3166  	ret = PTR_ERR(state);
c21443c2c792cd Trond Myklebust   2013-02-07  3167  	if (IS_ERR(state))
c21443c2c792cd Trond Myklebust   2013-02-07  3168  		goto out;
a974deee477af8 Trond Myklebust   2017-02-08  3169  	ctx->state = state;
c21443c2c792cd Trond Myklebust   2013-02-07  3170  	if (server->caps & NFS_CAP_POSIX_LOCK)
c21443c2c792cd Trond Myklebust   2013-02-07  3171  		set_bit(NFS_STATE_POSIX_LOCKS, &state->flags);
a8ce377a5db8d3 Jeff Layton       2016-09-17  3172  	if (opendata->o_res.rflags & NFS4_OPEN_RESULT_MAY_NOTIFY_LOCK)
a8ce377a5db8d3 Jeff Layton       2016-09-17  3173  		set_bit(NFS_STATE_MAY_NOTIFY_LOCK, &state->flags);
43245eca6e670e Olga Kornievskaia 2022-02-02  3174  	if (opendata->o_res.rflags & NFS4_OPEN_RESULT_PRESERVE_UNLINKED)
43245eca6e670e Olga Kornievskaia 2022-02-02  3175  		set_bit(NFS_INO_PRESERVE_UNLINKED, &NFS_I(state->inode)->flags);
c21443c2c792cd Trond Myklebust   2013-02-07  3176  
cf5b4059ba7197 Trond Myklebust   2020-02-05  3177  	switch(opendata->o_arg.claim) {
cf5b4059ba7197 Trond Myklebust   2020-02-05  3178  	default:
cf5b4059ba7197 Trond Myklebust   2020-02-05  3179  		break;
cf5b4059ba7197 Trond Myklebust   2020-02-05  3180  	case NFS4_OPEN_CLAIM_NULL:
cf5b4059ba7197 Trond Myklebust   2020-02-05  3181  	case NFS4_OPEN_CLAIM_DELEGATE_CUR:
cf5b4059ba7197 Trond Myklebust   2020-02-05  3182  	case NFS4_OPEN_CLAIM_DELEGATE_PREV:
cf5b4059ba7197 Trond Myklebust   2020-02-05  3183  		if (!opendata->rpc_done)
cf5b4059ba7197 Trond Myklebust   2020-02-05  3184  			break;
820620516993c1 Trond Myklebust   2024-06-16  3185  		if (opendata->o_res.delegation.type != 0)
cf5b4059ba7197 Trond Myklebust   2020-02-05  3186  			dir_verifier = nfs_save_change_attribute(dir);
26573137bc0af6 Trond Myklebust   2025-11-19  3187  	}
cf5b4059ba7197 Trond Myklebust   2020-02-05 @3188  	nfs_set_verifier(dentry, dir_verifier);
26573137bc0af6 Trond Myklebust   2025-11-19  3189  
26573137bc0af6 Trond Myklebust   2025-11-19  3190  	dentry = opendata->dentry;
26573137bc0af6 Trond Myklebust   2025-11-19  3191  	if (d_really_is_negative(dentry)) {
26573137bc0af6 Trond Myklebust   2025-11-19  3192  		struct dentry *alias;
26573137bc0af6 Trond Myklebust   2025-11-19  3193  		d_drop(dentry);
26573137bc0af6 Trond Myklebust   2025-11-19  3194  		alias = d_splice_alias(igrab(state->inode), dentry);
26573137bc0af6 Trond Myklebust   2025-11-19  3195  		/* d_splice_alias() can't fail here - it's a non-directory */
26573137bc0af6 Trond Myklebust   2025-11-19  3196  		if (alias) {
26573137bc0af6 Trond Myklebust   2025-11-19  3197  			dput(ctx->dentry);
26573137bc0af6 Trond Myklebust   2025-11-19  3198  			nfs_set_verifier(alias, dir_verifier);
26573137bc0af6 Trond Myklebust   2025-11-19  3199  			ctx->dentry = dentry = alias;
26573137bc0af6 Trond Myklebust   2025-11-19  3200  		}
275bb307865a31 Trond Myklebust   2013-05-29  3201  	}
275bb307865a31 Trond Myklebust   2013-05-29  3202  
af9b6d7570ca9a Trond Myklebust   2018-06-29  3203  	/* Parse layoutget results before we check for access */
af9b6d7570ca9a Trond Myklebust   2018-06-29  3204  	pnfs_parse_lgopen(state->inode, opendata->lgp, ctx);
af9b6d7570ca9a Trond Myklebust   2018-06-29  3205  
d564d2c4c2445c ChenXiaoSong      2022-09-23  3206  	ret = nfs4_opendata_access(sp->so_cred, opendata, state, acc_mode);
c21443c2c792cd Trond Myklebust   2013-02-07  3207  	if (ret != 0)
c21443c2c792cd Trond Myklebust   2013-02-07  3208  		goto out;
c21443c2c792cd Trond Myklebust   2013-02-07  3209  
0460253913e50a Trond Myklebust   2024-02-24  3210  	if (d_inode(dentry) == state->inode)
c45ffdd2696130 Trond Myklebust   2013-05-29  3211  		nfs_inode_attach_open_context(ctx);
2409a976a2990e Fred Isaman       2016-10-06  3212  
c21443c2c792cd Trond Myklebust   2013-02-07  3213  out:
2135e5d56278ff Trond Myklebust   2022-08-02  3214  	if (!opendata->cancelled) {
6949493884fe88 Trond Myklebust   2022-05-14  3215  		if (opendata->lgp) {
6949493884fe88 Trond Myklebust   2022-05-14  3216  			nfs4_lgopen_release(opendata->lgp);
6949493884fe88 Trond Myklebust   2022-05-14  3217  			opendata->lgp = NULL;
6949493884fe88 Trond Myklebust   2022-05-14  3218  		}
ae55e59da0e401 Trond Myklebust   2018-05-22  3219  		nfs4_sequence_free_slot(&opendata->o_res.seq_res);
2135e5d56278ff Trond Myklebust   2022-08-02  3220  	}
c21443c2c792cd Trond Myklebust   2013-02-07  3221  	return ret;
c21443c2c792cd Trond Myklebust   2013-02-07  3222  }
c21443c2c792cd Trond Myklebust   2013-02-07  3223  
Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki