diff options
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r-- | fs/cifs/file.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 26048dc9069a..a3634e43bd4f 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -266,6 +266,16 @@ cifs_new_fileinfo(__u16 fileHandle, struct file *file, return pCifsFile; } +/* Release a reference on the file private data */ +void cifsFileInfo_put(struct cifsFileInfo *cifs_file) +{ + if (atomic_dec_and_test(&cifs_file->count)) { + cifs_put_tlink(cifs_file->tlink); + dput(cifs_file->dentry); + kfree(cifs_file); + } +} + int cifs_open(struct inode *inode, struct file *file) { int rc = -EACCES; |