NFS: Remove the nfs4_label argument from nfs_fhget()
authorAnna Schumaker <Anna.Schumaker@Netapp.com>
Fri, 22 Oct 2021 17:11:11 +0000 (13:11 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 5 Nov 2021 18:54:40 +0000 (14:54 -0400)
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/dir.c
fs/nfs/export.c
fs/nfs/getroot.c
fs/nfs/inode.c
fs/nfs/nfs4file.c
fs/nfs/nfs4proc.c
include/linux/nfs_fs.h

index 1c74f9d2f3a165a029b14271e7f50ae0ef089452..bd89f39e8ba91e2ba36d60bbba64f6ed0eecb5f3 100644 (file)
@@ -697,7 +697,7 @@ again:
                goto out;
        }
 
-       inode = nfs_fhget(dentry->d_sb, entry->fh, entry->fattr, entry->fattr->label);
+       inode = nfs_fhget(dentry->d_sb, entry->fh, entry->fattr);
        alias = d_splice_alias(inode, dentry);
        d_lookup_done(dentry);
        if (alias) {
@@ -1782,7 +1782,7 @@ struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, unsigned in
                res = ERR_PTR(error);
                goto out;
        }
-       inode = nfs_fhget(dentry->d_sb, fhandle, fattr, fattr->label);
+       inode = nfs_fhget(dentry->d_sb, fhandle, fattr);
        res = ERR_CAST(inode);
        if (IS_ERR(res))
                goto out;
@@ -2059,7 +2059,7 @@ nfs_add_or_obtain(struct dentry *dentry, struct nfs_fh *fhandle,
                if (error < 0)
                        goto out_error;
        }
-       inode = nfs_fhget(dentry->d_sb, fhandle, fattr, fattr->label);
+       inode = nfs_fhget(dentry->d_sb, fhandle, fattr);
        d = d_splice_alias(inode, dentry);
 out:
        dput(parent);
index a0462f7e7e3538698d94e94738198229aa75d7b9..171c424cb6d53027f8edb109e64296a8e8db04c8 100644 (file)
@@ -103,7 +103,7 @@ nfs_fh_to_dentry(struct super_block *sb, struct fid *fid,
                goto out_free_fattr;
        }
 
-       inode = nfs_fhget(sb, server_fh, fattr, fattr->label);
+       inode = nfs_fhget(sb, server_fh, fattr);
 
 out_found:
        dentry = d_obtain_alias(inode);
@@ -138,7 +138,7 @@ nfs_get_parent(struct dentry *dentry)
                goto out;
        }
 
-       pinode = nfs_fhget(sb, &fh, fattr, fattr->label);
+       pinode = nfs_fhget(sb, &fh, fattr);
        parent = d_obtain_alias(pinode);
 out:
        nfs_free_fattr(fattr);
index 7604cb6a0ac2382f970d5b01e1262ead6841e476..0aedee2011665e3e90ab7849f0c25346ba299d1f 100644 (file)
@@ -91,7 +91,7 @@ int nfs_get_root(struct super_block *s, struct fs_context *fc)
                goto out_fattr;
        }
 
-       inode = nfs_fhget(s, ctx->mntfh, fsinfo.fattr, NULL);
+       inode = nfs_fhget(s, ctx->mntfh, fsinfo.fattr);
        if (IS_ERR(inode)) {
                dprintk("nfs_get_root: get root inode failed\n");
                error = PTR_ERR(inode);
index df109287f2e044d3a4a964e7ecc96df8ac867b94..be28f0251dee95dc9bc984a299bf9831f605a1bc 100644 (file)
@@ -448,7 +448,7 @@ static void nfs_inode_init_dir(struct nfs_inode *nfsi)
  * instead of inode number.
  */
 struct inode *
-nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr, struct nfs4_label *label)
+nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr)
 {
        struct nfs_find_desc desc = {
                .fh     = fh,
@@ -581,7 +581,7 @@ nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr, st
                           fattr->size != 0)
                        nfs_set_cache_invalid(inode, NFS_INO_INVALID_BLOCKS);
 
-               nfs_setsecurity(inode, fattr, label);
+               nfs_setsecurity(inode, fattr, fattr->label);
 
                nfsi->attrtimeo = NFS_MINATTRTIMEO(inode);
                nfsi->attrtimeo_timestamp = now;
index e2451f66024c1a650b39f63d0b28d078116e1f00..e79ae4cbc395e2c5218444810de7f06f0628a1be 100644 (file)
@@ -344,8 +344,7 @@ static struct file *__nfs42_ssc_open(struct vfsmount *ss_mnt,
                goto out;
        snprintf(read_name, len, SSC_READ_NAME_BODY, read_name_gen++);
 
-       r_ino = nfs_fhget(ss_mnt->mnt_root->d_inode->i_sb, src_fh, fattr,
-                       NULL);
+       r_ino = nfs_fhget(ss_mnt->mnt_root->d_inode->i_sb, src_fh, fattr);
        if (IS_ERR(r_ino)) {
                res = ERR_CAST(r_ino);
                goto out_free_name;
index 4d09c81502cf470a03e0dd0cbcc403a41bbae033..b25adb2250eff9ee3ffadb385d0063e36e04e2ae 100644 (file)
@@ -2008,7 +2008,7 @@ nfs4_opendata_get_inode(struct nfs4_opendata *data)
                if (!(data->f_attr.valid & NFS_ATTR_FATTR))
                        return ERR_PTR(-EAGAIN);
                inode = nfs_fhget(data->dir->d_sb, &data->o_res.fh,
-                               &data->f_attr, data->f_attr.label);
+                               &data->f_attr);
                break;
        default:
                inode = d_inode(data->dentry);
index 6eda001b306bf509d740490bd1e766338399c836..c36c6a559fc95075947e9976a6a44ec65f2b16f3 100644 (file)
@@ -388,7 +388,7 @@ extern void nfs_zap_caches(struct inode *);
 extern void nfs_set_inode_stale(struct inode *inode);
 extern void nfs_invalidate_atime(struct inode *);
 extern struct inode *nfs_fhget(struct super_block *, struct nfs_fh *,
-                               struct nfs_fattr *, struct nfs4_label *);
+                               struct nfs_fattr *);
 struct inode *nfs_ilookup(struct super_block *sb, struct nfs_fattr *, struct nfs_fh *);
 extern int nfs_refresh_inode(struct inode *, struct nfs_fattr *);
 extern int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr);