mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
9p: Make sure we are able to clunk the cached fid on umount
dcache prune happen on umount. So we cannot mark the client satus disconnect. That will prevent a 9p call to the server Signed-off-by: Aneesh Kumar K.V <[email protected]> Signed-off-by: Eric Van Hensbergen <[email protected]>
This commit is contained in:
parent
d994f4058d
commit
6d96d3ab7a
5 changed files with 34 additions and 3 deletions
13
fs/9p/v9fs.c
13
fs/9p/v9fs.c
|
|
@ -342,6 +342,19 @@ void v9fs_session_cancel(struct v9fs_session_info *v9ses) {
|
|||
p9_client_disconnect(v9ses->clnt);
|
||||
}
|
||||
|
||||
/**
|
||||
* v9fs_session_begin_cancel - Begin terminate of a session
|
||||
* @v9ses: session to terminate
|
||||
*
|
||||
* After this call we don't allow any request other than clunk.
|
||||
*/
|
||||
|
||||
void v9fs_session_begin_cancel(struct v9fs_session_info *v9ses)
|
||||
{
|
||||
P9_DPRINTK(P9_DEBUG_ERROR, "begin cancel session %p\n", v9ses);
|
||||
p9_client_begin_disconnect(v9ses->clnt);
|
||||
}
|
||||
|
||||
extern int v9fs_error_init(void);
|
||||
|
||||
static struct kobject *v9fs_kobj;
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@ struct p9_fid *v9fs_session_init(struct v9fs_session_info *, const char *,
|
|||
char *);
|
||||
void v9fs_session_close(struct v9fs_session_info *v9ses);
|
||||
void v9fs_session_cancel(struct v9fs_session_info *v9ses);
|
||||
void v9fs_session_begin_cancel(struct v9fs_session_info *v9ses);
|
||||
|
||||
#define V9FS_MAGIC 0x01021997
|
||||
|
||||
|
|
|
|||
|
|
@ -193,6 +193,7 @@ static void v9fs_kill_super(struct super_block *s)
|
|||
|
||||
kill_anon_super(s);
|
||||
|
||||
v9fs_session_cancel(v9ses);
|
||||
v9fs_session_close(v9ses);
|
||||
kfree(v9ses);
|
||||
s->s_fs_info = NULL;
|
||||
|
|
@ -205,7 +206,7 @@ v9fs_umount_begin(struct super_block *sb)
|
|||
struct v9fs_session_info *v9ses;
|
||||
|
||||
v9ses = sb->s_fs_info;
|
||||
v9fs_session_cancel(v9ses);
|
||||
v9fs_session_begin_cancel(v9ses);
|
||||
}
|
||||
|
||||
static const struct super_operations v9fs_super_ops = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue