From bc90df66887af63bd67223616f9084c4e9567056 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Sun, 3 Mar 2013 23:45:33 -0500 Subject: [PATCH] Linux 3.9 compat: Do not depend on f_vfsmnt torvalds/linux@182be684784334598eee1d90274e7f7aa0063616 removed the preprocessor definition for f_vfsmnt. The ability to access the mountpoint via ->f_path.mnt has been stable for a long time, so we switch to that. Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf --- module/spl/spl-vnode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 4d571c6c4..fb8f1fc7e 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -175,7 +175,7 @@ vn_open(const char *path, uio_seg_t seg, int flags, int mode, if (IS_ERR(fp)) SRETURN(-PTR_ERR(fp)); - rc = vfs_getattr(fp->f_vfsmnt, fp->f_dentry, &stat); + rc = vfs_getattr(fp->f_path.mnt, fp->f_dentry, &stat); if (rc) { filp_close(fp, 0); SRETURN(-rc); @@ -602,7 +602,7 @@ vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4) fp = vp->v_file; - rc = vfs_getattr(fp->f_vfsmnt, fp->f_dentry, &stat); + rc = vfs_getattr(fp->f_path.mnt, fp->f_dentry, &stat); if (rc) SRETURN(-rc); @@ -754,7 +754,7 @@ vn_getf(int fd) if (vp == NULL) SGOTO(out_fget, rc); - if (vfs_getattr(lfp->f_vfsmnt, lfp->f_dentry, &stat)) + if (vfs_getattr(lfp->f_path.mnt, lfp->f_dentry, &stat)) SGOTO(out_vnode, rc); mutex_enter(&vp->v_lock); -- 2.40.0