diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-04-05 16:42:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-04-05 16:42:54 -0400 |
commit | 749d229761ff0135cc4e16b8a28b41ae2f6b2c35 (patch) | |
tree | 25551c8cfb38319211f5ee59e78462a0f6fb85c4 /fs/9p/v9fs.c | |
parent | 795d580baec0d5386b83a8b557df47c20810e86b (diff) | |
parent | 3dc9fef67f6292692dba181a6d0fd0211bd0a607 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
9p: saving negative to unsigned char
9p: return on mutex_lock_interruptible()
9p: Creating files with names too long should fail with ENAMETOOLONG.
9p: Make sure we are able to clunk the cached fid on umount
9p: drop nlink remove
fs/9p: Clunk the fid resulting from partial walk of the name
9p: documentation update
9p: Fix setting of protocol flags in v9fs_session_info structure.
Diffstat (limited to 'fs/9p/v9fs.c')
-rw-r--r-- | fs/9p/v9fs.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c index cb57d3326182..5c5bc8480070 100644 --- a/fs/9p/v9fs.c +++ b/fs/9p/v9fs.c | |||
@@ -242,7 +242,7 @@ struct p9_fid *v9fs_session_init(struct v9fs_session_info *v9ses, | |||
242 | list_add(&v9ses->slist, &v9fs_sessionlist); | 242 | list_add(&v9ses->slist, &v9fs_sessionlist); |
243 | spin_unlock(&v9fs_sessionlist_lock); | 243 | spin_unlock(&v9fs_sessionlist_lock); |
244 | 244 | ||
245 | v9ses->flags = V9FS_PROTO_2000U | V9FS_ACCESS_USER; | 245 | v9ses->flags = V9FS_ACCESS_USER; |
246 | strcpy(v9ses->uname, V9FS_DEFUSER); | 246 | strcpy(v9ses->uname, V9FS_DEFUSER); |
247 | strcpy(v9ses->aname, V9FS_DEFANAME); | 247 | strcpy(v9ses->aname, V9FS_DEFANAME); |
248 | v9ses->uid = ~0; | 248 | v9ses->uid = ~0; |
@@ -263,8 +263,10 @@ struct p9_fid *v9fs_session_init(struct v9fs_session_info *v9ses, | |||
263 | goto error; | 263 | goto error; |
264 | } | 264 | } |
265 | 265 | ||
266 | if (!p9_is_proto_dotu(v9ses->clnt)) | 266 | if (p9_is_proto_dotl(v9ses->clnt)) |
267 | v9ses->flags &= ~V9FS_PROTO_2000U; | 267 | v9ses->flags |= V9FS_PROTO_2000L; |
268 | else if (p9_is_proto_dotu(v9ses->clnt)) | ||
269 | v9ses->flags |= V9FS_PROTO_2000U; | ||
268 | 270 | ||
269 | v9ses->maxdata = v9ses->clnt->msize - P9_IOHDRSZ; | 271 | v9ses->maxdata = v9ses->clnt->msize - P9_IOHDRSZ; |
270 | 272 | ||
@@ -341,6 +343,19 @@ void v9fs_session_cancel(struct v9fs_session_info *v9ses) { | |||
341 | p9_client_disconnect(v9ses->clnt); | 343 | p9_client_disconnect(v9ses->clnt); |
342 | } | 344 | } |
343 | 345 | ||
346 | /** | ||
347 | * v9fs_session_begin_cancel - Begin terminate of a session | ||
348 | * @v9ses: session to terminate | ||
349 | * | ||
350 | * After this call we don't allow any request other than clunk. | ||
351 | */ | ||
352 | |||
353 | void v9fs_session_begin_cancel(struct v9fs_session_info *v9ses) | ||
354 | { | ||
355 | P9_DPRINTK(P9_DEBUG_ERROR, "begin cancel session %p\n", v9ses); | ||
356 | p9_client_begin_disconnect(v9ses->clnt); | ||
357 | } | ||
358 | |||
344 | extern int v9fs_error_init(void); | 359 | extern int v9fs_error_init(void); |
345 | 360 | ||
346 | static struct kobject *v9fs_kobj; | 361 | static struct kobject *v9fs_kobj; |