Unverified Commit cc678bf7 authored by Christian Brauner's avatar Christian Brauner
Browse files

fhandle: raise FILEID_IS_DIR in handle_type

Currently FILEID_IS_DIR is raised in fh_flags which is wrong.
Raise it in handle->handle_type were it's supposed to be.

Link: https://lore.kernel.org/20250624-work-pidfs-fhandle-v2-1-d02a04858fe3@kernel.org


Fixes: c374196b ("fs: name_to_handle_at() support for "explicit connectable" file handles")
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Reviewed-by: default avatarAmir Goldstein <amir73il@gmail.com>
Cc: stable@kernel.org
Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent f077638b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ static long do_sys_name_to_handle(const struct path *path,
		if (fh_flags & EXPORT_FH_CONNECTABLE) {
			handle->handle_type |= FILEID_IS_CONNECTABLE;
			if (d_is_dir(path->dentry))
				fh_flags |= FILEID_IS_DIR;
				handle->handle_type |= FILEID_IS_DIR;
		}
		retval = 0;
	}