Просмотр исходного кода

nfsd_vfs_write(): use file_inode()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro 11 лет назад
Родитель
Сommit
6f4e0d5aaa
1 измененных файлов с 1 добавлено и 3 удалено
  1. 1 3
      fs/nfsd/vfs.c

+ 1 - 3
fs/nfsd/vfs.c

@@ -930,7 +930,6 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
 				unsigned long *cnt, int *stablep)
 				unsigned long *cnt, int *stablep)
 {
 {
 	struct svc_export	*exp;
 	struct svc_export	*exp;
-	struct dentry		*dentry;
 	struct inode		*inode;
 	struct inode		*inode;
 	mm_segment_t		oldfs;
 	mm_segment_t		oldfs;
 	__be32			err = 0;
 	__be32			err = 0;
@@ -949,8 +948,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
 		 */
 		 */
 		current->flags |= PF_LESS_THROTTLE;
 		current->flags |= PF_LESS_THROTTLE;
 
 
-	dentry = file->f_path.dentry;
-	inode = dentry->d_inode;
+	inode = file_inode(file);
 	exp   = fhp->fh_export;
 	exp   = fhp->fh_export;
 
 
 	use_wgather = (rqstp->rq_vers == 2) && EX_WGATHER(exp);
 	use_wgather = (rqstp->rq_vers == 2) && EX_WGATHER(exp);