summaryrefslogtreecommitdiff
path: root/fs/cifs/dir.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2009-09-12 19:54:29 +0400
committerSteve French <sfrench@us.ibm.com>2009-09-15 23:45:25 +0400
commit48541bd3dd4739b4d574b44ea47660c88d833677 (patch)
tree5ee6d16b924b8c171e66088c5bb3b1d1720cd29f /fs/cifs/dir.c
parent058daf4f6795fd23fcca41fe53151cdcbbd263ec (diff)
downloadlinux-48541bd3dd4739b4d574b44ea47660c88d833677.tar.xz
cifs: have cifsFileInfo hold an extra inode reference
It's possible that this struct will outlive the filp to which it is attached. If it does and it needs to do some work on the inode, then it'll need a reference. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/dir.c')
-rw-r--r--fs/cifs/dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index 44f735aa2e3f..36435502b5e8 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -147,7 +147,7 @@ cifs_fill_fileinfo(struct inode *newinode, __u16 fileHandle,
pCifsFile->netfid = fileHandle;
pCifsFile->pid = current->tgid;
- pCifsFile->pInode = newinode;
+ pCifsFile->pInode = igrab(newinode);
pCifsFile->invalidHandle = false;
pCifsFile->closePend = false;
mutex_init(&pCifsFile->fh_mutex);