From 2f42c4bc8037a9e0c403bbb0b0fe0c4fb565b813 Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Mon, 11 Oct 2010 15:07:18 -0400 Subject: [PATCH] --- yaml --- r: 213426 b: refs/heads/master c: a5e18bc36e9e05ce0338d370a2ce4290910e43ea h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/cifs/cifsglob.h | 4 ++-- trunk/fs/cifs/dir.c | 3 ++- trunk/fs/cifs/file.c | 2 +- trunk/fs/cifs/misc.c | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index db89ecb96c78..5f43f434038b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1c456013e96f10915578dc61095d19b4906f64ac +refs/heads/master: a5e18bc36e9e05ce0338d370a2ce4290910e43ea diff --git a/trunk/fs/cifs/cifsglob.h b/trunk/fs/cifs/cifsglob.h index 4f85dfdf197d..8289e61937a2 100644 --- a/trunk/fs/cifs/cifsglob.h +++ b/trunk/fs/cifs/cifsglob.h @@ -387,7 +387,7 @@ struct cifsFileInfo { /* BB add lock scope info here if needed */ ; /* lock scope id (0 if none) */ struct file *pfile; /* needed for writepage */ - struct inode *pInode; /* needed for oplock break */ + struct dentry *dentry; struct vfsmount *mnt; struct tcon_link *tlink; struct mutex lock_mutex; @@ -412,7 +412,7 @@ static inline void cifsFileInfo_put(struct cifsFileInfo *cifs_file) { if (atomic_dec_and_test(&cifs_file->count)) { cifs_put_tlink(cifs_file->tlink); - iput(cifs_file->pInode); + dput(cifs_file->dentry); kfree(cifs_file); } } diff --git a/trunk/fs/cifs/dir.c b/trunk/fs/cifs/dir.c index e249b561ce8f..6887c412c61a 100644 --- a/trunk/fs/cifs/dir.c +++ b/trunk/fs/cifs/dir.c @@ -135,6 +135,7 @@ cifs_new_fileinfo(struct inode *newinode, __u16 fileHandle, struct file *file, struct vfsmount *mnt, struct tcon_link *tlink, unsigned int oflags, __u32 oplock) { + struct dentry *dentry = file->f_path.dentry; struct cifsFileInfo *pCifsFile; struct cifsInodeInfo *pCifsInode; @@ -145,7 +146,7 @@ cifs_new_fileinfo(struct inode *newinode, __u16 fileHandle, struct file *file, pCifsFile->netfid = fileHandle; pCifsFile->pid = current->tgid; pCifsFile->uid = current_fsuid(); - pCifsFile->pInode = igrab(newinode); + pCifsFile->dentry = dget(dentry); pCifsFile->mnt = mnt; pCifsFile->pfile = file; pCifsFile->invalidHandle = false; diff --git a/trunk/fs/cifs/file.c b/trunk/fs/cifs/file.c index 80856f180711..c302b9c52644 100644 --- a/trunk/fs/cifs/file.c +++ b/trunk/fs/cifs/file.c @@ -2335,7 +2335,7 @@ void cifs_oplock_break(struct work_struct *work) { struct cifsFileInfo *cfile = container_of(work, struct cifsFileInfo, oplock_break); - struct inode *inode = cfile->pInode; + struct inode *inode = cfile->dentry->d_inode; struct cifsInodeInfo *cinode = CIFS_I(inode); int rc, waitrc = 0; diff --git a/trunk/fs/cifs/misc.c b/trunk/fs/cifs/misc.c index 252f2768db84..9bac3e74b314 100644 --- a/trunk/fs/cifs/misc.c +++ b/trunk/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;