diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/9p/v9fs.h | 1 | ||||
-rw-r--r-- | fs/9p/vfs_addr.c | 2 | ||||
-rw-r--r-- | fs/9p/vfs_file.c | 10 |
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 | ||
226 | out_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 |