X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=fs%2F9p%2Ffcall.c;h=dc336a67592fb6330503c0a9e9fa7b70f7e805ee;hb=ea74342900dbe79f2a31ed3609b9e2bdb5c7198c;hp=71742ba150c44f12a4abb3b4ce45c15fcc15e775;hpb=e02a4cabfcb9a999b74a2e2e6f13ffcb7ff2d606;p=linux-2.6-omap-h63xx.git diff --git a/fs/9p/fcall.c b/fs/9p/fcall.c index 71742ba150c..dc336a67592 100644 --- a/fs/9p/fcall.c +++ b/fs/9p/fcall.c @@ -24,10 +24,10 @@ * */ -#include #include #include #include +#include #include #include "debug.h" @@ -98,23 +98,20 @@ v9fs_t_attach(struct v9fs_session_info *v9ses, char *uname, char *aname, static void v9fs_t_clunk_cb(void *a, struct v9fs_fcall *tc, struct v9fs_fcall *rc, int err) { - int fid; + int fid, id; struct v9fs_session_info *v9ses; - if (err) - return; - + id = 0; fid = tc->params.tclunk.fid; - kfree(tc); - - if (!rc) - return; - - v9ses = a; - if (rc->id == RCLUNK) - v9fs_put_idpool(fid, &v9ses->fidpool); + if (rc) + id = rc->id; + kfree(tc); kfree(rc); + if (id == RCLUNK) { + v9ses = a; + v9fs_put_idpool(fid, &v9ses->fidpool); + } } /**