Commit 49ad227d authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag '9p-for-5.17-rc1' of git://github.com/martinetd/linux

Pull 9p updates from Dominique Martinet:
 "Fixes, split 9p_net_fd, and new reviewer:

   - fix possible uninitialized memory usage for setattr

   - fix fscache reading hole in a file just after it's been grown

   - split net/9p/trans_fd.c in its own module like other transports.

     The new transport module defaults to 9P_NET and is autoloaded if
     required so users should not be impacted

   - add Christian Schoenebeck to 9p reviewers

   - some more trivial cleanup"

* tag '9p-for-5.17-rc1' of git://github.com/martinetd/linux:
  9p: fix enodata when reading growing file
  net/9p: show error message if user 'msize' cannot be satisfied
  MAINTAINERS: 9p: add Christian Schoenebeck as reviewer
  9p: only copy valid iattrs in 9P2000.L setattr implementation
  9p: Use BUG_ON instead of if condition followed by BUG.
  net/p9: load default transports
  9p/xen: autoload when xenbus service is available
  9p/trans_fd: split into dedicated module
  fs: 9p: remove unneeded variable
  9p/trans_virtio: Fix typo in the comment for p9_virtio_create()
parents 59d41458 19d1c326
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -226,6 +226,7 @@ F: drivers/net/ethernet/8390/
M:	Eric Van Hensbergen <ericvh@gmail.com>
M:	Latchesar Ionkov <lucho@ionkov.net>
M:	Dominique Martinet <asmadeus@codewreck.org>
R:	Christian Schoenebeck <linux_oss@crudebyte.com>
L:	v9fs-developer@lists.sourceforge.net
S:	Maintained
W:	http://swik.net/v9fs
+5 −0
Original line number Diff line number Diff line
@@ -43,6 +43,11 @@ static void v9fs_req_issue_op(struct netfs_read_subrequest *subreq)
	iov_iter_xarray(&to, READ, &rreq->mapping->i_pages, pos, len);

	total = p9_client_read(fid, pos, &to, &err);

	/* if we just extended the file size, any portion not in
	 * cache won't be on server and is zeroes */
	__set_bit(NETFS_SREQ_CLEAR_TAIL, &subreq->flags);

	netfs_subreq_terminated(subreq, err ?: total, false);
}

+2 −4
Original line number Diff line number Diff line
@@ -115,7 +115,6 @@ int v9fs_file_open(struct inode *inode, struct file *file)

static int v9fs_file_lock(struct file *filp, int cmd, struct file_lock *fl)
{
	int res = 0;
	struct inode *inode = file_inode(filp);

	p9_debug(P9_DEBUG_VFS, "filp: %p lock: %p\n", filp, fl);
@@ -125,7 +124,7 @@ static int v9fs_file_lock(struct file *filp, int cmd, struct file_lock *fl)
		invalidate_mapping_pages(&inode->i_data, 0, -1);
	}

	return res;
	return 0;
}

static int v9fs_file_do_lock(struct file *filp, int cmd, struct file_lock *fl)
@@ -140,8 +139,7 @@ static int v9fs_file_do_lock(struct file *filp, int cmd, struct file_lock *fl)
	fid = filp->private_data;
	BUG_ON(fid == NULL);

	if ((fl->fl_flags & FL_POSIX) != FL_POSIX)
		BUG();
	BUG_ON((fl->fl_flags & FL_POSIX) != FL_POSIX);

	res = locks_lock_file_wait(filp, fl);
	if (res < 0)
+20 −9
Original line number Diff line number Diff line
@@ -552,7 +552,10 @@ int v9fs_vfs_setattr_dotl(struct user_namespace *mnt_userns,
{
	int retval, use_dentry = 0;
	struct p9_fid *fid = NULL;
	struct p9_iattr_dotl p9attr;
	struct p9_iattr_dotl p9attr = {
		.uid = INVALID_UID,
		.gid = INVALID_GID,
	};
	struct inode *inode = d_inode(dentry);

	p9_debug(P9_DEBUG_VFS, "\n");
@@ -562,14 +565,22 @@ int v9fs_vfs_setattr_dotl(struct user_namespace *mnt_userns,
		return retval;

	p9attr.valid = v9fs_mapped_iattr_valid(iattr->ia_valid);
	if (iattr->ia_valid & ATTR_MODE)
		p9attr.mode = iattr->ia_mode;
	if (iattr->ia_valid & ATTR_UID)
		p9attr.uid = iattr->ia_uid;
	if (iattr->ia_valid & ATTR_GID)
		p9attr.gid = iattr->ia_gid;
	if (iattr->ia_valid & ATTR_SIZE)
		p9attr.size = iattr->ia_size;
	if (iattr->ia_valid & ATTR_ATIME_SET) {
		p9attr.atime_sec = iattr->ia_atime.tv_sec;
		p9attr.atime_nsec = iattr->ia_atime.tv_nsec;
	}
	if (iattr->ia_valid & ATTR_MTIME_SET) {
		p9attr.mtime_sec = iattr->ia_mtime.tv_sec;
		p9attr.mtime_nsec = iattr->ia_mtime.tv_nsec;
	}

	if (iattr->ia_valid & ATTR_FILE) {
		fid = iattr->ia_file->private_data;
+0 −2
Original line number Diff line number Diff line
@@ -551,6 +551,4 @@ struct p9_fcall {
int p9_errstr2errno(char *errstr, int len);

int p9_error_init(void);
int p9_trans_fd_init(void);
void p9_trans_fd_exit(void);
#endif /* NET_9P_H */
Loading