Commit b33879aa authored by Jeff Layton's avatar Jeff Layton Committed by Steve French

cifs: move cifsFileInfo_put to file.c

...and make it non-inlined in preparation for the move of most of
cifs_close to it.
Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
Reviewed-by: default avatarSuresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
parent 4477288a
...@@ -408,15 +408,7 @@ static inline void cifsFileInfo_get(struct cifsFileInfo *cifs_file) ...@@ -408,15 +408,7 @@ static inline void cifsFileInfo_get(struct cifsFileInfo *cifs_file)
atomic_inc(&cifs_file->count); atomic_inc(&cifs_file->count);
} }
/* Release a reference on the file private data */ void cifsFileInfo_put(struct cifsFileInfo *cifs_file);
static inline 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);
}
}
/* /*
* One of these for each file inode * One of these for each file inode
......
...@@ -266,6 +266,16 @@ cifs_new_fileinfo(__u16 fileHandle, struct file *file, ...@@ -266,6 +266,16 @@ cifs_new_fileinfo(__u16 fileHandle, struct file *file,
return pCifsFile; 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 cifs_open(struct inode *inode, struct file *file)
{ {
int rc = -EACCES; int rc = -EACCES;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment