mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
NFS: Remove the nfs4_label from the nfs4_create_res struct
Instead, use the label embedded in the attached fattr. Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
committed by
Trond Myklebust
parent
b1db9a401d
commit
68be1742c2
@@ -4850,7 +4850,6 @@ struct nfs4_createdata {
|
|||||||
struct nfs4_create_res res;
|
struct nfs4_create_res res;
|
||||||
struct nfs_fh fh;
|
struct nfs_fh fh;
|
||||||
struct nfs_fattr fattr;
|
struct nfs_fattr fattr;
|
||||||
struct nfs4_label *label;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct nfs4_createdata *nfs4_alloc_createdata(struct inode *dir,
|
static struct nfs4_createdata *nfs4_alloc_createdata(struct inode *dir,
|
||||||
@@ -4862,8 +4861,8 @@ static struct nfs4_createdata *nfs4_alloc_createdata(struct inode *dir,
|
|||||||
if (data != NULL) {
|
if (data != NULL) {
|
||||||
struct nfs_server *server = NFS_SERVER(dir);
|
struct nfs_server *server = NFS_SERVER(dir);
|
||||||
|
|
||||||
data->label = nfs4_label_alloc(server, GFP_KERNEL);
|
data->fattr.label = nfs4_label_alloc(server, GFP_KERNEL);
|
||||||
if (IS_ERR(data->label))
|
if (IS_ERR(data->fattr.label))
|
||||||
goto out_free;
|
goto out_free;
|
||||||
|
|
||||||
data->msg.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_CREATE];
|
data->msg.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_CREATE];
|
||||||
@@ -4874,12 +4873,11 @@ static struct nfs4_createdata *nfs4_alloc_createdata(struct inode *dir,
|
|||||||
data->arg.name = name;
|
data->arg.name = name;
|
||||||
data->arg.attrs = sattr;
|
data->arg.attrs = sattr;
|
||||||
data->arg.ftype = ftype;
|
data->arg.ftype = ftype;
|
||||||
data->arg.bitmask = nfs4_bitmask(server, data->label);
|
data->arg.bitmask = nfs4_bitmask(server, data->fattr.label);
|
||||||
data->arg.umask = current_umask();
|
data->arg.umask = current_umask();
|
||||||
data->res.server = server;
|
data->res.server = server;
|
||||||
data->res.fh = &data->fh;
|
data->res.fh = &data->fh;
|
||||||
data->res.fattr = &data->fattr;
|
data->res.fattr = &data->fattr;
|
||||||
data->res.label = data->label;
|
|
||||||
nfs_fattr_init(data->res.fattr);
|
nfs_fattr_init(data->res.fattr);
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
@@ -4901,14 +4899,14 @@ static int nfs4_do_create(struct inode *dir, struct dentry *dentry, struct nfs4_
|
|||||||
data->res.fattr->time_start,
|
data->res.fattr->time_start,
|
||||||
NFS_INO_INVALID_DATA);
|
NFS_INO_INVALID_DATA);
|
||||||
spin_unlock(&dir->i_lock);
|
spin_unlock(&dir->i_lock);
|
||||||
status = nfs_instantiate(dentry, data->res.fh, data->res.fattr, data->res.label);
|
status = nfs_instantiate(dentry, data->res.fh, data->res.fattr, data->res.fattr->label);
|
||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void nfs4_free_createdata(struct nfs4_createdata *data)
|
static void nfs4_free_createdata(struct nfs4_createdata *data)
|
||||||
{
|
{
|
||||||
nfs4_label_free(data->label);
|
nfs4_label_free(data->fattr.label);
|
||||||
kfree(data);
|
kfree(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6353,7 +6353,7 @@ static int nfs4_xdr_dec_create(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
|
|||||||
status = decode_getfh(xdr, res->fh);
|
status = decode_getfh(xdr, res->fh);
|
||||||
if (status)
|
if (status)
|
||||||
goto out;
|
goto out;
|
||||||
decode_getfattr_label(xdr, res->fattr, res->label, res->server);
|
decode_getfattr_label(xdr, res->fattr, res->fattr->label, res->server);
|
||||||
out:
|
out:
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1040,7 +1040,6 @@ struct nfs4_create_res {
|
|||||||
const struct nfs_server * server;
|
const struct nfs_server * server;
|
||||||
struct nfs_fh * fh;
|
struct nfs_fh * fh;
|
||||||
struct nfs_fattr * fattr;
|
struct nfs_fattr * fattr;
|
||||||
struct nfs4_label *label;
|
|
||||||
struct nfs4_change_info dir_cinfo;
|
struct nfs4_change_info dir_cinfo;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user