aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-18 17:45:30 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-18 17:45:30 -0400
commitdba94f2155f581395ef9608418778e3491b3d470 (patch)
tree71b034aa2f6bafd5bb7ffcefe68c89cef6bbfc6d /fs
parent34a984f7b0cc6355a1e0c184251d0d4cc86f44d2 (diff)
parentf569d3ef8254d4b3b8daa4f131f9397d48bf296c (diff)
Merge tag 'for-linus-4.1-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs
Pull 9pfs updates from Eric Van Hensbergen: "Some accumulated cleanup patches for kerneldoc and unused variables as well as some lock bug fixes and adding privateport option for RDMA" * tag 'for-linus-4.1-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs: net/9p: add a privport option for RDMA transport. fs/9p: Initialize status in v9fs_file_do_lock. net/9p: Initialize opts->privport as it should be. net/9p: use memcpy() instead of snprintf() in p9_mount_tag_show() 9p: use unsigned integers for nwqid/count 9p: do not crash on unknown lock status code 9p: fix error handling in v9fs_file_do_lock 9p: remove unused variable in p9_fd_create() 9p: kerneldoc warning fixes
Diffstat (limited to 'fs')
-rw-r--r--fs/9p/v9fs.h1
-rw-r--r--fs/9p/vfs_addr.c2
-rw-r--r--fs/9p/vfs_file.c10
3 files changed, 6 insertions, 7 deletions
diff --git a/fs/9p/v9fs.h b/fs/9p/v9fs.h
index 099c7712631c..fb9ffcb43277 100644
--- a/fs/9p/v9fs.h
+++ b/fs/9p/v9fs.h
@@ -78,7 +78,6 @@ enum p9_cache_modes {
78 * @cache: cache mode of type &p9_cache_modes 78 * @cache: cache mode of type &p9_cache_modes
79 * @cachetag: the tag of the cache associated with this session 79 * @cachetag: the tag of the cache associated with this session
80 * @fscache: session cookie associated with FS-Cache 80 * @fscache: session cookie associated with FS-Cache
81 * @options: copy of options string given by user
82 * @uname: string user name to mount hierarchy as 81 * @uname: string user name to mount hierarchy as
83 * @aname: mount specifier for remote hierarchy 82 * @aname: mount specifier for remote hierarchy
84 * @maxdata: maximum data to be sent/recvd per protocol message 83 * @maxdata: maximum data to be sent/recvd per protocol message
diff --git a/fs/9p/vfs_addr.c b/fs/9p/vfs_addr.c
index be35d05a4d0e..e9e04376c52c 100644
--- a/fs/9p/vfs_addr.c
+++ b/fs/9p/vfs_addr.c
@@ -231,9 +231,7 @@ static int v9fs_launder_page(struct page *page)
231/** 231/**
232 * v9fs_direct_IO - 9P address space operation for direct I/O 232 * v9fs_direct_IO - 9P address space operation for direct I/O
233 * @iocb: target I/O control block 233 * @iocb: target I/O control block
234 * @iov: array of vectors that define I/O buffer
235 * @pos: offset in file to begin the operation 234 * @pos: offset in file to begin the operation
236 * @nr_segs: size of iovec array
237 * 235 *
238 * The presence of v9fs_direct_IO() in the address space ops vector 236 * The presence of v9fs_direct_IO() in the address space ops vector
239 * allowes open() O_DIRECT flags which would have failed otherwise. 237 * allowes open() O_DIRECT flags which would have failed otherwise.
diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c
index 2a9dd37dc426..1ef16bd8280b 100644
--- a/fs/9p/vfs_file.c
+++ b/fs/9p/vfs_file.c
@@ -151,7 +151,7 @@ static int v9fs_file_do_lock(struct file *filp, int cmd, struct file_lock *fl)
151{ 151{
152 struct p9_flock flock; 152 struct p9_flock flock;
153 struct p9_fid *fid; 153 struct p9_fid *fid;
154 uint8_t status; 154 uint8_t status = P9_LOCK_ERROR;
155 int res = 0; 155 int res = 0;
156 unsigned char fl_type; 156 unsigned char fl_type;
157 157
@@ -196,7 +196,7 @@ static int v9fs_file_do_lock(struct file *filp, int cmd, struct file_lock *fl)
196 for (;;) { 196 for (;;) {
197 res = p9_client_lock_dotl(fid, &flock, &status); 197 res = p9_client_lock_dotl(fid, &flock, &status);
198 if (res < 0) 198 if (res < 0)
199 break; 199 goto out_unlock;
200 200
201 if (status != P9_LOCK_BLOCKED) 201 if (status != P9_LOCK_BLOCKED)
202 break; 202 break;
@@ -214,14 +214,16 @@ static int v9fs_file_do_lock(struct file *filp, int cmd, struct file_lock *fl)
214 case P9_LOCK_BLOCKED: 214 case P9_LOCK_BLOCKED:
215 res = -EAGAIN; 215 res = -EAGAIN;
216 break; 216 break;
217 default:
218 WARN_ONCE(1, "unknown lock status code: %d\n", status);
219 /* fallthough */
217 case P9_LOCK_ERROR: 220 case P9_LOCK_ERROR:
218 case P9_LOCK_GRACE: 221 case P9_LOCK_GRACE:
219 res = -ENOLCK; 222 res = -ENOLCK;
220 break; 223 break;
221 default:
222 BUG();
223 } 224 }
224 225
226out_unlock:
225 /* 227 /*
226 * incase server returned error for lock request, revert 228 * incase server returned error for lock request, revert
227 * it locally 229 * it locally