Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213440
b: refs/heads/master
c: b33879a
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Layton authored and Steve French committed Oct 18, 2010
1 parent 5ef7ec3 commit 32da3db
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4477288a103631980750c86547d1fd54bfd2ba7d
refs/heads/master: b33879aa834ebe03ced3dca4e3b822bd8894a474
10 changes: 1 addition & 9 deletions trunk/fs/cifs/cifsglob.h
Original file line number Diff line number Diff line change
Expand Up @@ -408,15 +408,7 @@ static inline void cifsFileInfo_get(struct cifsFileInfo *cifs_file)
atomic_inc(&cifs_file->count);
}

/* Release a reference on the file private data */
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);
}
}
void cifsFileInfo_put(struct cifsFileInfo *cifs_file);

/*
* One of these for each file inode
Expand Down
10 changes: 10 additions & 0 deletions trunk/fs/cifs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 32da3db

Please sign in to comment.