Skip to content

Commit de2f378

Browse files
committed
Merge tag 'nfsd-6.12-4' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux
Pull nfsd fix from Chuck Lever: - Fix a v6.12-rc regression when exporting ext4 filesystems with NFSD * tag 'nfsd-6.12-4' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: NFSD: Fix READDIR on NFSv3 mounts of ext4 exports
2 parents bceea66 + bb1fb40 commit de2f378

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

fs/nfsd/vfs.c

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -903,11 +903,6 @@ __nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type,
903903
goto out;
904904
}
905905

906-
if (may_flags & NFSD_MAY_64BIT_COOKIE)
907-
file->f_mode |= FMODE_64BITHASH;
908-
else
909-
file->f_mode |= FMODE_32BITHASH;
910-
911906
*filp = file;
912907
out:
913908
return host_err;
@@ -2174,13 +2169,15 @@ nfsd_readdir(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t *offsetp,
21742169
loff_t offset = *offsetp;
21752170
int may_flags = NFSD_MAY_READ;
21762171

2177-
if (fhp->fh_64bit_cookies)
2178-
may_flags |= NFSD_MAY_64BIT_COOKIE;
2179-
21802172
err = nfsd_open(rqstp, fhp, S_IFDIR, may_flags, &file);
21812173
if (err)
21822174
goto out;
21832175

2176+
if (fhp->fh_64bit_cookies)
2177+
file->f_mode |= FMODE_64BITHASH;
2178+
else
2179+
file->f_mode |= FMODE_32BITHASH;
2180+
21842181
offset = vfs_llseek(file, offset, SEEK_SET);
21852182
if (offset < 0) {
21862183
err = nfserrno((int)offset);

0 commit comments

Comments
 (0)