diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-07-04 22:36:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-07-04 22:36:06 -0400 |
commit | 1dc51b8288007753ad7cd7d08bb8fa930fc8bb10 (patch) | |
tree | 0616c0ff7d877e64d9c248a6cdff074eae258840 /net/9p | |
parent | 9b284cbdb5de3b8871014f8290d1b540e5181c21 (diff) | |
parent | 0f1db7dee200127da4c07928189748918c312031 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull more vfs updates from Al Viro:
"Assorted VFS fixes and related cleanups (IMO the most interesting in
that part are f_path-related things and Eric's descriptor-related
stuff). UFS regression fixes (it got broken last cycle). 9P fixes.
fs-cache series, DAX patches, Jan's file_remove_suid() work"
[ I'd say this is much more than "fixes and related cleanups". The
file_table locking rule change by Eric Dumazet is a rather big and
fundamental update even if the patch isn't huge. - Linus ]
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (49 commits)
9p: cope with bogus responses from server in p9_client_{read,write}
p9_client_write(): avoid double p9_free_req()
9p: forgetting to cancel request on interrupted zero-copy RPC
dax: bdev_direct_access() may sleep
block: Add support for DAX reads/writes to block devices
dax: Use copy_from_iter_nocache
dax: Add block size note to documentation
fs/file.c: __fget() and dup2() atomicity rules
fs/file.c: don't acquire files->file_lock in fd_install()
fs:super:get_anon_bdev: fix race condition could cause dev exceed its upper limitation
vfs: avoid creation of inode number 0 in get_next_ino
namei: make set_root_rcu() return void
make simple_positive() public
ufs: use dir_pages instead of ufs_dir_pages()
pagemap.h: move dir_pages() over there
remove the pointless include of lglock.h
fs: cleanup slight list_entry abuse
xfs: Correctly lock inode when removing suid and file capabilities
fs: Call security_ops->inode_killpriv on truncate
fs: Provide function telling whether file_remove_privs() will do anything
...
Diffstat (limited to 'net/9p')
-rw-r--r-- | net/9p/client.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/net/9p/client.c b/net/9p/client.c index 6f4c4c88db84..498454b3c06c 100644 --- a/net/9p/client.c +++ b/net/9p/client.c | |||
@@ -843,7 +843,8 @@ static struct p9_req_t *p9_client_zc_rpc(struct p9_client *c, int8_t type, | |||
843 | if (err < 0) { | 843 | if (err < 0) { |
844 | if (err == -EIO) | 844 | if (err == -EIO) |
845 | c->status = Disconnected; | 845 | c->status = Disconnected; |
846 | goto reterr; | 846 | if (err != -ERESTARTSYS) |
847 | goto reterr; | ||
847 | } | 848 | } |
848 | if (req->status == REQ_STATUS_ERROR) { | 849 | if (req->status == REQ_STATUS_ERROR) { |
849 | p9_debug(P9_DEBUG_ERROR, "req_status error %d\n", req->t_err); | 850 | p9_debug(P9_DEBUG_ERROR, "req_status error %d\n", req->t_err); |
@@ -1582,6 +1583,10 @@ p9_client_read(struct p9_fid *fid, u64 offset, struct iov_iter *to, int *err) | |||
1582 | p9_free_req(clnt, req); | 1583 | p9_free_req(clnt, req); |
1583 | break; | 1584 | break; |
1584 | } | 1585 | } |
1586 | if (rsize < count) { | ||
1587 | pr_err("bogus RREAD count (%d > %d)\n", count, rsize); | ||
1588 | count = rsize; | ||
1589 | } | ||
1585 | 1590 | ||
1586 | p9_debug(P9_DEBUG_9P, "<<< RREAD count %d\n", count); | 1591 | p9_debug(P9_DEBUG_9P, "<<< RREAD count %d\n", count); |
1587 | if (!count) { | 1592 | if (!count) { |
@@ -1647,6 +1652,11 @@ p9_client_write(struct p9_fid *fid, u64 offset, struct iov_iter *from, int *err) | |||
1647 | if (*err) { | 1652 | if (*err) { |
1648 | trace_9p_protocol_dump(clnt, req->rc); | 1653 | trace_9p_protocol_dump(clnt, req->rc); |
1649 | p9_free_req(clnt, req); | 1654 | p9_free_req(clnt, req); |
1655 | break; | ||
1656 | } | ||
1657 | if (rsize < count) { | ||
1658 | pr_err("bogus RWRITE count (%d > %d)\n", count, rsize); | ||
1659 | count = rsize; | ||
1650 | } | 1660 | } |
1651 | 1661 | ||
1652 | p9_debug(P9_DEBUG_9P, "<<< RWRITE count %d\n", count); | 1662 | p9_debug(P9_DEBUG_9P, "<<< RWRITE count %d\n", count); |