mirror of https://gitee.com/openkylin/linux.git
9p changes for the 3.4 merge window
The following changes since commit 3c761ea05a8900a907f32b628611873f6bef24b2: Fix autofs compile without CONFIG_COMPAT (2012-02-26 09:44:55 -0800) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs.git for-linus Jim Garlick (3): net/9p: don't allow Tflush to be interrupted net/9p: handle flushed Tclunk/Tremove 9p: statfs should not override server f_type fs/9p/vfs_super.c | 2 +- net/9p/client.c | 26 +++++++++++++++++++++++--- 2 files changed, 24 insertions(+), 4 deletions(-) -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org iQIcBAABAgAGBQJPcJNvAAoJEGQ1yQUIRaTOeDYP/2JdsCRt8SGstGgdpi9zWdDL GjhNguTSqfQSv+LB7mvdM49JFEFkPdZ1/Giu7nkZmYqRR6RdprYuRsiX6lQnAE49 CFjIyQkeeMhvEvYLX10KG7WtMOicOQGHdLEIfAlHBdA8ILZDJTz+F7nB0S4EG6ST 3TRXVoa2ojS5SVUxQSOFQsT0CM5+5K95Bnjlv57diyWNb3lkdhzXDQmmaL/OCFpE 6Zh0+CylAaiybBxT3JjSKlchIlNh59Ei0X7S0J8wDPEzk7+PLfjhlKeyFvgC/TOp 9yIpX1nzOm6B0l8vXXatdW9QRubIvOYTZe7mtoxpIPPWVnOTI1fhHsteBDjPA7wj NJeMTzDRkBWbo+ntQ53MzFsbBLlF+DuFBWFrIRc3Ov3+endDxUCEhCxSBDCj1Hd5 /dLNvyeiQPcne+j3oKIlTQLc1HJi6EEMCNVusBhT3tm3k1FbEFfeT9YqcsuRvPlD ozn6tVcRkyCf184tF8rBOY1nPwk2TMLV8vrUPYOtqD/4plNLxmG6JTFcLLBLA+wE G4dQBknM8LCDX6mTHJAF7zkEXomjhvDK9JANQ0sOczKu47+IfAFAs2Vc55R6d6Dd 8m2H9QlVv0DGu7yHzo0/0W5gFq2xl5/5lV6u0sDAp0jo5MmOuIPqG+oF7NVnaM3Q 6aI9BHEZ0Dz63VD2dniY =Jfvn -----END PGP SIGNATURE----- Merge tag 'for-linus-3.4-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs Pull 9p changes for the 3.4 merge window from Eric Van Hensbergen. * tag 'for-linus-3.4-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs: 9p: statfs should not override server f_type net/9p: handle flushed Tclunk/Tremove net/9p: don't allow Tflush to be interrupted
This commit is contained in:
commit
e9c0f1529c
|
@ -259,7 +259,7 @@ static int v9fs_statfs(struct dentry *dentry, struct kstatfs *buf)
|
|||
if (v9fs_proto_dotl(v9ses)) {
|
||||
res = p9_client_statfs(fid, &rs);
|
||||
if (res == 0) {
|
||||
buf->f_type = V9FS_MAGIC;
|
||||
buf->f_type = rs.type;
|
||||
buf->f_bsize = rs.bsize;
|
||||
buf->f_blocks = rs.blocks;
|
||||
buf->f_bfree = rs.bfree;
|
||||
|
|
|
@ -740,10 +740,18 @@ p9_client_rpc(struct p9_client *c, int8_t type, const char *fmt, ...)
|
|||
c->status = Disconnected;
|
||||
goto reterr;
|
||||
}
|
||||
again:
|
||||
/* Wait for the response */
|
||||
err = wait_event_interruptible(*req->wq,
|
||||
req->status >= REQ_STATUS_RCVD);
|
||||
|
||||
if ((err == -ERESTARTSYS) && (c->status == Connected)
|
||||
&& (type == P9_TFLUSH)) {
|
||||
sigpending = 1;
|
||||
clear_thread_flag(TIF_SIGPENDING);
|
||||
goto again;
|
||||
}
|
||||
|
||||
if (req->status == REQ_STATUS_ERROR) {
|
||||
p9_debug(P9_DEBUG_ERROR, "req_status error %d\n", req->t_err);
|
||||
err = req->t_err;
|
||||
|
@ -1420,6 +1428,7 @@ int p9_client_clunk(struct p9_fid *fid)
|
|||
int err;
|
||||
struct p9_client *clnt;
|
||||
struct p9_req_t *req;
|
||||
int retries = 0;
|
||||
|
||||
if (!fid) {
|
||||
pr_warn("%s (%d): Trying to clunk with NULL fid\n",
|
||||
|
@ -1428,7 +1437,9 @@ int p9_client_clunk(struct p9_fid *fid)
|
|||
return 0;
|
||||
}
|
||||
|
||||
p9_debug(P9_DEBUG_9P, ">>> TCLUNK fid %d\n", fid->fid);
|
||||
again:
|
||||
p9_debug(P9_DEBUG_9P, ">>> TCLUNK fid %d (try %d)\n", fid->fid,
|
||||
retries);
|
||||
err = 0;
|
||||
clnt = fid->clnt;
|
||||
|
||||
|
@ -1444,8 +1455,14 @@ int p9_client_clunk(struct p9_fid *fid)
|
|||
error:
|
||||
/*
|
||||
* Fid is not valid even after a failed clunk
|
||||
* If interrupted, retry once then give up and
|
||||
* leak fid until umount.
|
||||
*/
|
||||
p9_fid_destroy(fid);
|
||||
if (err == -ERESTARTSYS) {
|
||||
if (retries++ == 0)
|
||||
goto again;
|
||||
} else
|
||||
p9_fid_destroy(fid);
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL(p9_client_clunk);
|
||||
|
@ -1470,7 +1487,10 @@ int p9_client_remove(struct p9_fid *fid)
|
|||
|
||||
p9_free_req(clnt, req);
|
||||
error:
|
||||
p9_fid_destroy(fid);
|
||||
if (err == -ERESTARTSYS)
|
||||
p9_client_clunk(fid);
|
||||
else
|
||||
p9_fid_destroy(fid);
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL(p9_client_remove);
|
||||
|
|
Loading…
Reference in New Issue