diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-06-29 13:31:44 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-06-29 13:31:44 -0700 |
commit | 18c9901d7435b20b13357907bac2c0e3b0fd4cd6 (patch) | |
tree | ea136473471c0a7864e8b65451e803be2d577830 /fs/nfsd/nfsfh.c | |
parent | 0a37714f96d5746268dc09bdd400a215f180ba9b (diff) | |
parent | 7b8c9d7bb4570ee4800642009c8f2d9756004552 (diff) | |
download | linux-18c9901d7435b20b13357907bac2c0e3b0fd4cd6.tar.gz linux-18c9901d7435b20b13357907bac2c0e3b0fd4cd6.tar.bz2 linux-18c9901d7435b20b13357907bac2c0e3b0fd4cd6.zip |
Merge tag 'fsnotify_for_v6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull fsnotify updates from Jan Kara:
- Support for fanotify events returning file handles for filesystems
not exportable via NFS
- Improved error handling exportfs functions
- Add missing FS_OPEN events when unusual open helpers are used
* tag 'fsnotify_for_v6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
fsnotify: move fsnotify_open() hook into do_dentry_open()
exportfs: check for error return value from exportfs_encode_*()
fanotify: support reporting non-decodeable file handles
exportfs: allow exporting non-decodeable file handles to userspace
exportfs: add explicit flag to request non-decodeable file handles
exportfs: change connectable argument to bit flags
Diffstat (limited to 'fs/nfsd/nfsfh.c')
-rw-r--r-- | fs/nfsd/nfsfh.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c index e8e13ae72e3c..c291389a1d71 100644 --- a/fs/nfsd/nfsfh.c +++ b/fs/nfsd/nfsfh.c @@ -414,10 +414,13 @@ static void _fh_update(struct svc_fh *fhp, struct svc_export *exp, struct fid *fid = (struct fid *) (fhp->fh_handle.fh_fsid + fhp->fh_handle.fh_size/4 - 1); int maxsize = (fhp->fh_maxsize - fhp->fh_handle.fh_size)/4; - int subtreecheck = !(exp->ex_flags & NFSEXP_NOSUBTREECHECK); + int fh_flags = (exp->ex_flags & NFSEXP_NOSUBTREECHECK) ? 0 : + EXPORT_FH_CONNECTABLE; + int fileid_type = + exportfs_encode_fh(dentry, fid, &maxsize, fh_flags); fhp->fh_handle.fh_fileid_type = - exportfs_encode_fh(dentry, fid, &maxsize, subtreecheck); + fileid_type > 0 ? fileid_type : FILEID_INVALID; fhp->fh_handle.fh_size += maxsize * 4; } else { fhp->fh_handle.fh_fileid_type = FILEID_ROOT; |