diff options
-rw-r--r-- | fs/cifs/cifsglob.h | 4 | ||||
-rw-r--r-- | fs/cifs/dir.c | 3 | ||||
-rw-r--r-- | fs/cifs/file.c | 2 | ||||
-rw-r--r-- | fs/cifs/misc.c | 2 |
4 files changed, 6 insertions, 5 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index 4f85dfdf197d..8289e61937a2 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h | |||
@@ -387,7 +387,7 @@ struct cifsFileInfo { | |||
387 | /* BB add lock scope info here if needed */ ; | 387 | /* BB add lock scope info here if needed */ ; |
388 | /* lock scope id (0 if none) */ | 388 | /* lock scope id (0 if none) */ |
389 | struct file *pfile; /* needed for writepage */ | 389 | struct file *pfile; /* needed for writepage */ |
390 | struct inode *pInode; /* needed for oplock break */ | 390 | struct dentry *dentry; |
391 | struct vfsmount *mnt; | 391 | struct vfsmount *mnt; |
392 | struct tcon_link *tlink; | 392 | struct tcon_link *tlink; |
393 | struct mutex lock_mutex; | 393 | struct mutex lock_mutex; |
@@ -412,7 +412,7 @@ static inline void cifsFileInfo_put(struct cifsFileInfo *cifs_file) | |||
412 | { | 412 | { |
413 | if (atomic_dec_and_test(&cifs_file->count)) { | 413 | if (atomic_dec_and_test(&cifs_file->count)) { |
414 | cifs_put_tlink(cifs_file->tlink); | 414 | cifs_put_tlink(cifs_file->tlink); |
415 | iput(cifs_file->pInode); | 415 | dput(cifs_file->dentry); |
416 | kfree(cifs_file); | 416 | kfree(cifs_file); |
417 | } | 417 | } |
418 | } | 418 | } |
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index e249b561ce8f..6887c412c61a 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c | |||
@@ -135,6 +135,7 @@ cifs_new_fileinfo(struct inode *newinode, __u16 fileHandle, struct file *file, | |||
135 | struct vfsmount *mnt, struct tcon_link *tlink, | 135 | struct vfsmount *mnt, struct tcon_link *tlink, |
136 | unsigned int oflags, __u32 oplock) | 136 | unsigned int oflags, __u32 oplock) |
137 | { | 137 | { |
138 | struct dentry *dentry = file->f_path.dentry; | ||
138 | struct cifsFileInfo *pCifsFile; | 139 | struct cifsFileInfo *pCifsFile; |
139 | struct cifsInodeInfo *pCifsInode; | 140 | struct cifsInodeInfo *pCifsInode; |
140 | 141 | ||
@@ -145,7 +146,7 @@ cifs_new_fileinfo(struct inode *newinode, __u16 fileHandle, struct file *file, | |||
145 | pCifsFile->netfid = fileHandle; | 146 | pCifsFile->netfid = fileHandle; |
146 | pCifsFile->pid = current->tgid; | 147 | pCifsFile->pid = current->tgid; |
147 | pCifsFile->uid = current_fsuid(); | 148 | pCifsFile->uid = current_fsuid(); |
148 | pCifsFile->pInode = igrab(newinode); | 149 | pCifsFile->dentry = dget(dentry); |
149 | pCifsFile->mnt = mnt; | 150 | pCifsFile->mnt = mnt; |
150 | pCifsFile->pfile = file; | 151 | pCifsFile->pfile = file; |
151 | pCifsFile->invalidHandle = false; | 152 | pCifsFile->invalidHandle = false; |
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 80856f180711..c302b9c52644 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -2335,7 +2335,7 @@ void cifs_oplock_break(struct work_struct *work) | |||
2335 | { | 2335 | { |
2336 | struct cifsFileInfo *cfile = container_of(work, struct cifsFileInfo, | 2336 | struct cifsFileInfo *cfile = container_of(work, struct cifsFileInfo, |
2337 | oplock_break); | 2337 | oplock_break); |
2338 | struct inode *inode = cfile->pInode; | 2338 | struct inode *inode = cfile->dentry->d_inode; |
2339 | struct cifsInodeInfo *cinode = CIFS_I(inode); | 2339 | struct cifsInodeInfo *cinode = CIFS_I(inode); |
2340 | int rc, waitrc = 0; | 2340 | int rc, waitrc = 0; |
2341 | 2341 | ||
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) | |||
578 | } | 578 | } |
579 | 579 | ||
580 | cFYI(1, "file id match, oplock break"); | 580 | cFYI(1, "file id match, oplock break"); |
581 | pCifsInode = CIFS_I(netfile->pInode); | 581 | pCifsInode = CIFS_I(netfile->dentry->d_inode); |
582 | pCifsInode->clientCanCacheAll = false; | 582 | pCifsInode->clientCanCacheAll = false; |
583 | if (pSMB->OplockLevel == 0) | 583 | if (pSMB->OplockLevel == 0) |
584 | pCifsInode->clientCanCacheRead = false; | 584 | pCifsInode->clientCanCacheRead = false; |