Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e33bae14 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'for-linus' of git://github.com/ericvh/linux

* 'for-linus' of git://github.com/ericvh/linux:
  9p: fix 9p.txt to advertise msize instead of maxdata
  net/9p: Convert net/9p protocol dumps to tracepoints
  fs/9p: change an int to unsigned int
  fs/9p: Cleanup option parsing in 9p
  9p: move dereference after NULL check
  fs/9p: inode file operation is properly initialized init_special_inode
  fs/9p: Update zero-copy implementation in 9p
parents 7670c701 14211d02
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ OPTIONS

  wfdno=n	the file descriptor for writing with trans=fd

  maxdata=n	the number of bytes to use for 9p packet payload (msize)
  msize=n	the number of bytes to use for 9p packet payload

  port=n	port to connect to on the remote server

+26 −7
Original line number Diff line number Diff line
@@ -132,21 +132,19 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts)
	options = tmp_options;

	while ((p = strsep(&options, ",")) != NULL) {
		int token;
		int token, r;
		if (!*p)
			continue;
		token = match_token(p, tokens, args);
		if (token < Opt_uname) {
			int r = match_int(&args[0], &option);
		switch (token) {
		case Opt_debug:
			r = match_int(&args[0], &option);
			if (r < 0) {
				P9_DPRINTK(P9_DEBUG_ERROR,
					   "integer field, but no integer?\n");
				ret = r;
				continue;
			}
		}
		switch (token) {
		case Opt_debug:
			v9ses->debug = option;
#ifdef CONFIG_NET_9P_DEBUG
			p9_debug_level = option;
@@ -154,12 +152,33 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts)
			break;

		case Opt_dfltuid:
			r = match_int(&args[0], &option);
			if (r < 0) {
				P9_DPRINTK(P9_DEBUG_ERROR,
					   "integer field, but no integer?\n");
				ret = r;
				continue;
			}
			v9ses->dfltuid = option;
			break;
		case Opt_dfltgid:
			r = match_int(&args[0], &option);
			if (r < 0) {
				P9_DPRINTK(P9_DEBUG_ERROR,
					   "integer field, but no integer?\n");
				ret = r;
				continue;
			}
			v9ses->dfltgid = option;
			break;
		case Opt_afid:
			r = match_int(&args[0], &option);
			if (r < 0) {
				P9_DPRINTK(P9_DEBUG_ERROR,
					   "integer field, but no integer?\n");
				ret = r;
				continue;
			}
			v9ses->afid = option;
			break;
		case Opt_uname:
+6 −8
Original line number Diff line number Diff line
@@ -165,9 +165,8 @@ static int v9fs_dir_readdir(struct file *filp, void *dirent, filldir_t filldir)
		}
		while (rdir->head < rdir->tail) {
			p9stat_init(&st);
			err = p9stat_read(rdir->buf + rdir->head,
						rdir->tail - rdir->head, &st,
						fid->clnt->proto_version);
			err = p9stat_read(fid->clnt, rdir->buf + rdir->head,
					  rdir->tail - rdir->head, &st);
			if (err) {
				P9_DPRINTK(P9_DEBUG_VFS, "returned %d\n", err);
				err = -EIO;
@@ -241,10 +240,9 @@ static int v9fs_dir_readdir_dotl(struct file *filp, void *dirent,

		while (rdir->head < rdir->tail) {

			err = p9dirent_read(rdir->buf + rdir->head,
			err = p9dirent_read(fid->clnt, rdir->buf + rdir->head,
					    rdir->tail - rdir->head,
						&curdirent,
						fid->clnt->proto_version);
					    &curdirent);
			if (err < 0) {
				P9_DPRINTK(P9_DEBUG_VFS, "returned %d\n", err);
				err = -EIO;
+0 −2
Original line number Diff line number Diff line
@@ -278,10 +278,8 @@ int v9fs_init_inode(struct v9fs_session_info *v9ses,
	case S_IFSOCK:
		if (v9fs_proto_dotl(v9ses)) {
			inode->i_op = &v9fs_file_inode_operations_dotl;
			inode->i_fop = &v9fs_file_operations_dotl;
		} else if (v9fs_proto_dotu(v9ses)) {
			inode->i_op = &v9fs_file_inode_operations;
			inode->i_fop = &v9fs_file_operations;
		} else {
			P9_DPRINTK(P9_DEBUG_ERROR,
				   "special files without extended mode\n");
+3 −11
Original line number Diff line number Diff line
@@ -76,11 +76,8 @@ do { \
	} \
} while (0)

#define P9_DUMP_PKT(way, pdu) p9pdu_dump(way, pdu)

#else
#define P9_DPRINTK(level, format, arg...)  do { } while (0)
#define P9_DUMP_PKT(way, pdu) do { } while (0)
#endif


@@ -359,6 +356,9 @@ enum p9_qid_t {
/* Room for readdir header */
#define P9_READDIRHDRSZ	24

/* size of header for zero copy read/write */
#define P9_ZC_HDR_SZ 4096

/**
 * struct p9_qid - file system entity information
 * @type: 8-bit type &p9_qid_t
@@ -555,10 +555,6 @@ struct p9_rstatfs {
 * @tag: transaction id of the request
 * @offset: used by marshalling routines to track current position in buffer
 * @capacity: used by marshalling routines to track total malloc'd capacity
 * @pubuf: Payload user buffer given by the caller
 * @pkbuf: Payload kernel buffer given by the caller
 * @pbuf_size: pubuf/pkbuf(only one will be !NULL) size to be read/write.
 * @private: For transport layer's use.
 * @sdata: payload
 *
 * &p9_fcall represents the structure for all 9P RPC
@@ -575,10 +571,6 @@ struct p9_fcall {

	size_t offset;
	size_t capacity;
	char __user *pubuf;
	char *pkbuf;
	size_t pbuf_size;
	void *private;

	u8 *sdata;
};
Loading