]> Pileus Git - ~andy/linux/blobdiff - fs/9p/vfs_file.c
xfrm: allow to avoid copying DSCP during encapsulation
[~andy/linux] / fs / 9p / vfs_file.c
index c921ac92ea4c2dd7f28ff3bfae107fb1188946bf..d384a8b77ee8a705fe9763de2257b3c43224b816 100644 (file)
@@ -129,7 +129,7 @@ out_error:
 static int v9fs_file_lock(struct file *filp, int cmd, struct file_lock *fl)
 {
        int res = 0;
-       struct inode *inode = filp->f_path.dentry->d_inode;
+       struct inode *inode = file_inode(filp);
 
        p9_debug(P9_DEBUG_VFS, "filp: %p lock: %p\n", filp, fl);
 
@@ -298,7 +298,7 @@ static int v9fs_file_getlock(struct file *filp, struct file_lock *fl)
 
 static int v9fs_file_lock_dotl(struct file *filp, int cmd, struct file_lock *fl)
 {
-       struct inode *inode = filp->f_path.dentry->d_inode;
+       struct inode *inode = file_inode(filp);
        int ret = -ENOLCK;
 
        p9_debug(P9_DEBUG_VFS, "filp: %p cmd:%d lock: %p name: %s\n",
@@ -334,7 +334,7 @@ out_err:
 static int v9fs_file_flock_dotl(struct file *filp, int cmd,
        struct file_lock *fl)
 {
-       struct inode *inode = filp->f_path.dentry->d_inode;
+       struct inode *inode = file_inode(filp);
        int ret = -ENOLCK;
 
        p9_debug(P9_DEBUG_VFS, "filp: %p cmd:%d lock: %p name: %s\n",
@@ -525,7 +525,7 @@ v9fs_file_write(struct file *filp, const char __user * data,
        if (!count)
                goto out;
 
-       retval = v9fs_file_write_internal(filp->f_path.dentry->d_inode,
+       retval = v9fs_file_write_internal(file_inode(filp),
                                        filp->private_data,
                                        data, count, &origin, 1);
        /* update offset on successful write */
@@ -600,7 +600,7 @@ v9fs_vm_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
        struct v9fs_inode *v9inode;
        struct page *page = vmf->page;
        struct file *filp = vma->vm_file;
-       struct inode *inode = filp->f_path.dentry->d_inode;
+       struct inode *inode = file_inode(filp);
 
 
        p9_debug(P9_DEBUG_VFS, "page %p fid %lx\n",