diff options
author | Jeff Layton <jlayton@redhat.com> | 2009-09-12 11:54:29 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2009-09-15 19:45:25 +0000 |
commit | 48541bd3dd4739b4d574b44ea47660c88d833677 (patch) | |
tree | 5ee6d16b924b8c171e66088c5bb3b1d1720cd29f /fs/cifs/file.c | |
parent | 058daf4f6795fd23fcca41fe53151cdcbbd263ec (diff) | |
download | op-kernel-dev-48541bd3dd4739b4d574b44ea47660c88d833677.zip op-kernel-dev-48541bd3dd4739b4d574b44ea47660c88d833677.tar.gz |
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/file.c')
-rw-r--r-- | fs/cifs/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 225d127..b976cea 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -50,7 +50,7 @@ static inline struct cifsFileInfo *cifs_init_private( mutex_init(&private_data->lock_mutex); INIT_LIST_HEAD(&private_data->llist); private_data->pfile = file; /* needed for writepage */ - private_data->pInode = inode; + private_data->pInode = igrab(inode); private_data->invalidHandle = false; private_data->closePend = false; /* Initialize reference count to one. The private data is |