aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p/vfs_dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/9p/vfs_dir.c')
-rw-r--r--fs/9p/vfs_dir.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c
index c478a73..57a43b8 100644
--- a/fs/9p/vfs_dir.c
+++ b/fs/9p/vfs_dir.c
@@ -197,21 +197,18 @@ int v9fs_dir_release(struct inode *inode, struct file *filp)
filemap_fdatawait(inode->i_mapping);
if (fidnum >= 0) {
- fid->fidopen--;
dprintk(DEBUG_VFS, "fidopen: %d v9f->fid: %d\n", fid->fidopen,
fid->fid);
- if (fid->fidopen == 0) {
- if (v9fs_t_clunk(v9ses, fidnum, NULL))
- dprintk(DEBUG_ERROR, "clunk failed\n");
+ if (v9fs_t_clunk(v9ses, fidnum, NULL))
+ dprintk(DEBUG_ERROR, "clunk failed\n");
- v9fs_put_idpool(fid->fid, &v9ses->fidpool);
- }
+ v9fs_put_idpool(fid->fid, &v9ses->fidpool);
kfree(fid->rdir_fcall);
+ kfree(fid);
filp->private_data = NULL;
- v9fs_fid_destroy(fid);
}
d_drop(filp->f_dentry);