diff options
author | Jeff Layton <jlayton@redhat.com> | 2010-10-11 15:07:18 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2010-10-12 18:06:42 +0000 |
commit | a5e18bc36e9e05ce0338d370a2ce4290910e43ea (patch) | |
tree | 9d8b37c1dd20267c372ff8c98850eeb2f204449b /fs/cifs/misc.c | |
parent | 1c456013e96f10915578dc61095d19b4906f64ac (diff) | |
download | blackbird-op-linux-a5e18bc36e9e05ce0338d370a2ce4290910e43ea.tar.gz blackbird-op-linux-a5e18bc36e9e05ce0338d370a2ce4290910e43ea.zip |
cifs: keep dentry reference in cifsFileInfo instead of inode reference
cifsFileInfo is a bit problematic. It contains a reference back to the
struct file itself. This makes it difficult for a cifsFileInfo to exist
without a corresponding struct file.
It would be better instead of the cifsFileInfo just held info pertaining
to the open file on the server instead without any back refrences to the
struct file. This would allow it to exist after the filp to which it was
originally attached was closed.
Much of the use of the file pointer in this struct is to get at the
dentry. Begin divorcing the cifsFileInfo from the struct file by
keeping a reference to the dentry. Since the dentry will have a
reference to the inode, we can eliminate the "pInode" field too and
convert the igrab/iput to dget/dput.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Suresh Jayaraman <sjayaraman@suse.de>
Acked-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/misc.c')
-rw-r--r-- | fs/cifs/misc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c index 252f2768db84..9bac3e74b314 100644 --- a/fs/cifs/misc.c +++ b/fs/cifs/misc.c @@ -578,7 +578,7 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv) } cFYI(1, "file id match, oplock break"); - pCifsInode = CIFS_I(netfile->pInode); + pCifsInode = CIFS_I(netfile->dentry->d_inode); pCifsInode->clientCanCacheAll = false; if (pSMB->OplockLevel == 0) pCifsInode->clientCanCacheRead = false; |