mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Linux 3.9 compat: vfs_getattr takes two arguments
The function prototype of vfs_getattr previoulsy took struct vfsmount * and struct dentry * as arguments. These would always be defined together in a struct path *. torvalds/linux@3dadecce20 modified vfs_getattr to take struct path * is taken as an argument instead. Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
committed by
Brian Behlendorf
parent
bc90df6688
commit
2a305c34c8
+15
-2
@@ -175,7 +175,11 @@ vn_open(const char *path, uio_seg_t seg, int flags, int mode,
|
||||
if (IS_ERR(fp))
|
||||
SRETURN(-PTR_ERR(fp));
|
||||
|
||||
#ifdef HAVE_2ARGS_VFS_GETATTR
|
||||
rc = vfs_getattr(&fp->f_path, &stat);
|
||||
#else
|
||||
rc = vfs_getattr(fp->f_path.mnt, fp->f_dentry, &stat);
|
||||
#endif
|
||||
if (rc) {
|
||||
filp_close(fp, 0);
|
||||
SRETURN(-rc);
|
||||
@@ -602,7 +606,11 @@ vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4)
|
||||
|
||||
fp = vp->v_file;
|
||||
|
||||
rc = vfs_getattr(fp->f_path.mnt, fp->f_dentry, &stat);
|
||||
#ifdef HAVE_2ARGS_VFS_GETATTR
|
||||
rc = vfs_getattr(&fp->f_path, &stat);
|
||||
#else
|
||||
rc = vfs_getattr(fp->f_path.mnt, fp->f_dentry, &stat);
|
||||
#endif
|
||||
if (rc)
|
||||
SRETURN(-rc);
|
||||
|
||||
@@ -754,7 +762,12 @@ vn_getf(int fd)
|
||||
if (vp == NULL)
|
||||
SGOTO(out_fget, rc);
|
||||
|
||||
if (vfs_getattr(lfp->f_path.mnt, lfp->f_dentry, &stat))
|
||||
#ifdef HAVE_2ARGS_VFS_GETATTR
|
||||
rc = vfs_getattr(&lfp->f_path, &stat);
|
||||
#else
|
||||
rc = vfs_getattr(lfp->f_path.mnt, lfp->f_dentry, &stat);
|
||||
#endif
|
||||
if (rc)
|
||||
SGOTO(out_vnode, rc);
|
||||
|
||||
mutex_enter(&vp->v_lock);
|
||||
|
||||
Reference in New Issue
Block a user