Loading fs/nfs/export.c +7 −19 Original line number Diff line number Diff line Loading @@ -131,7 +131,6 @@ nfs_get_parent(struct dentry *dentry) struct super_block *sb = inode->i_sb; struct nfs_server *server = NFS_SB(sb); struct nfs_fattr *fattr = NULL; struct nfs4_label *label = NULL; struct dentry *parent; struct nfs_rpc_ops const *ops = server->nfs_client->rpc_ops; struct nfs_fh fh; Loading @@ -139,31 +138,20 @@ nfs_get_parent(struct dentry *dentry) if (!ops->lookupp) return ERR_PTR(-EACCES); fattr = nfs_alloc_fattr(); if (fattr == NULL) { parent = ERR_PTR(-ENOMEM); goto out; } label = nfs4_label_alloc(server, GFP_KERNEL); if (IS_ERR(label)) { parent = ERR_CAST(label); goto out_free_fattr; } fattr = nfs_alloc_fattr_with_label(server); if (fattr == NULL) return ERR_PTR(-ENOMEM); ret = ops->lookupp(inode, &fh, fattr, label); ret = ops->lookupp(inode, &fh, fattr); if (ret) { parent = ERR_PTR(ret); goto out_free_label; goto out; } pinode = nfs_fhget(sb, &fh, fattr, label); pinode = nfs_fhget(sb, &fh, fattr, fattr->label); parent = d_obtain_alias(pinode); out_free_label: nfs4_label_free(label); out_free_fattr: nfs_free_fattr(fattr); out: nfs_free_fattr(fattr); return parent; } Loading fs/nfs/nfs3proc.c +1 −1 Original line number Diff line number Diff line Loading @@ -208,7 +208,7 @@ nfs3_proc_lookup(struct inode *dir, struct dentry *dentry, } static int nfs3_proc_lookupp(struct inode *inode, struct nfs_fh *fhandle, struct nfs_fattr *fattr, struct nfs4_label *label) struct nfs_fattr *fattr) { const char dotdot[] = ".."; const size_t len = strlen(dotdot); Loading fs/nfs/nfs4proc.c +4 −6 Original line number Diff line number Diff line Loading @@ -4416,8 +4416,7 @@ nfs4_proc_lookup_mountpoint(struct inode *dir, struct dentry *dentry, } static int _nfs4_proc_lookupp(struct inode *inode, struct nfs_fh *fhandle, struct nfs_fattr *fattr, struct nfs4_label *label) struct nfs_fh *fhandle, struct nfs_fattr *fattr) { struct rpc_clnt *clnt = NFS_CLIENT(inode); struct nfs_server *server = NFS_SERVER(inode); Loading @@ -4429,7 +4428,6 @@ static int _nfs4_proc_lookupp(struct inode *inode, struct nfs4_lookupp_res res = { .server = server, .fattr = fattr, .label = label, .fh = fhandle, }; struct rpc_message msg = { Loading @@ -4442,7 +4440,7 @@ static int _nfs4_proc_lookupp(struct inode *inode, if (NFS_SERVER(inode)->flags & NFS_MOUNT_SOFTREVAL) task_flags |= RPC_TASK_TIMEOUT; args.bitmask = nfs4_bitmask(server, label); args.bitmask = nfs4_bitmask(server, fattr->label); nfs_fattr_init(fattr); Loading @@ -4454,14 +4452,14 @@ static int _nfs4_proc_lookupp(struct inode *inode, } static int nfs4_proc_lookupp(struct inode *inode, struct nfs_fh *fhandle, struct nfs_fattr *fattr, struct nfs4_label *label) struct nfs_fattr *fattr) { struct nfs4_exception exception = { .interruptible = true, }; int err; do { err = _nfs4_proc_lookupp(inode, fhandle, fattr, label); err = _nfs4_proc_lookupp(inode, fhandle, fattr); trace_nfs4_lookupp(inode, err); err = nfs4_handle_exception(NFS_SERVER(inode), err, &exception); Loading fs/nfs/nfs4xdr.c +1 −1 Original line number Diff line number Diff line Loading @@ -6201,7 +6201,7 @@ static int nfs4_xdr_dec_lookupp(struct rpc_rqst *rqstp, struct xdr_stream *xdr, status = decode_getfh(xdr, res->fh); if (status) goto out; status = decode_getfattr_label(xdr, res->fattr, res->label, res->server); status = decode_getfattr_label(xdr, res->fattr, res->fattr->label, res->server); out: return status; } Loading include/linux/nfs_xdr.h +1 −2 Original line number Diff line number Diff line Loading @@ -1108,7 +1108,6 @@ struct nfs4_lookupp_res { const struct nfs_server *server; struct nfs_fattr *fattr; struct nfs_fh *fh; struct nfs4_label *label; }; struct nfs4_lookup_root_arg { Loading Loading @@ -1741,7 +1740,7 @@ struct nfs_rpc_ops { int (*lookup) (struct inode *, struct dentry *, struct nfs_fh *, struct nfs_fattr *); int (*lookupp) (struct inode *, struct nfs_fh *, struct nfs_fattr *, struct nfs4_label *); struct nfs_fattr *); int (*access) (struct inode *, struct nfs_access_entry *); int (*readlink)(struct inode *, struct page *, unsigned int, unsigned int); Loading Loading
fs/nfs/export.c +7 −19 Original line number Diff line number Diff line Loading @@ -131,7 +131,6 @@ nfs_get_parent(struct dentry *dentry) struct super_block *sb = inode->i_sb; struct nfs_server *server = NFS_SB(sb); struct nfs_fattr *fattr = NULL; struct nfs4_label *label = NULL; struct dentry *parent; struct nfs_rpc_ops const *ops = server->nfs_client->rpc_ops; struct nfs_fh fh; Loading @@ -139,31 +138,20 @@ nfs_get_parent(struct dentry *dentry) if (!ops->lookupp) return ERR_PTR(-EACCES); fattr = nfs_alloc_fattr(); if (fattr == NULL) { parent = ERR_PTR(-ENOMEM); goto out; } label = nfs4_label_alloc(server, GFP_KERNEL); if (IS_ERR(label)) { parent = ERR_CAST(label); goto out_free_fattr; } fattr = nfs_alloc_fattr_with_label(server); if (fattr == NULL) return ERR_PTR(-ENOMEM); ret = ops->lookupp(inode, &fh, fattr, label); ret = ops->lookupp(inode, &fh, fattr); if (ret) { parent = ERR_PTR(ret); goto out_free_label; goto out; } pinode = nfs_fhget(sb, &fh, fattr, label); pinode = nfs_fhget(sb, &fh, fattr, fattr->label); parent = d_obtain_alias(pinode); out_free_label: nfs4_label_free(label); out_free_fattr: nfs_free_fattr(fattr); out: nfs_free_fattr(fattr); return parent; } Loading
fs/nfs/nfs3proc.c +1 −1 Original line number Diff line number Diff line Loading @@ -208,7 +208,7 @@ nfs3_proc_lookup(struct inode *dir, struct dentry *dentry, } static int nfs3_proc_lookupp(struct inode *inode, struct nfs_fh *fhandle, struct nfs_fattr *fattr, struct nfs4_label *label) struct nfs_fattr *fattr) { const char dotdot[] = ".."; const size_t len = strlen(dotdot); Loading
fs/nfs/nfs4proc.c +4 −6 Original line number Diff line number Diff line Loading @@ -4416,8 +4416,7 @@ nfs4_proc_lookup_mountpoint(struct inode *dir, struct dentry *dentry, } static int _nfs4_proc_lookupp(struct inode *inode, struct nfs_fh *fhandle, struct nfs_fattr *fattr, struct nfs4_label *label) struct nfs_fh *fhandle, struct nfs_fattr *fattr) { struct rpc_clnt *clnt = NFS_CLIENT(inode); struct nfs_server *server = NFS_SERVER(inode); Loading @@ -4429,7 +4428,6 @@ static int _nfs4_proc_lookupp(struct inode *inode, struct nfs4_lookupp_res res = { .server = server, .fattr = fattr, .label = label, .fh = fhandle, }; struct rpc_message msg = { Loading @@ -4442,7 +4440,7 @@ static int _nfs4_proc_lookupp(struct inode *inode, if (NFS_SERVER(inode)->flags & NFS_MOUNT_SOFTREVAL) task_flags |= RPC_TASK_TIMEOUT; args.bitmask = nfs4_bitmask(server, label); args.bitmask = nfs4_bitmask(server, fattr->label); nfs_fattr_init(fattr); Loading @@ -4454,14 +4452,14 @@ static int _nfs4_proc_lookupp(struct inode *inode, } static int nfs4_proc_lookupp(struct inode *inode, struct nfs_fh *fhandle, struct nfs_fattr *fattr, struct nfs4_label *label) struct nfs_fattr *fattr) { struct nfs4_exception exception = { .interruptible = true, }; int err; do { err = _nfs4_proc_lookupp(inode, fhandle, fattr, label); err = _nfs4_proc_lookupp(inode, fhandle, fattr); trace_nfs4_lookupp(inode, err); err = nfs4_handle_exception(NFS_SERVER(inode), err, &exception); Loading
fs/nfs/nfs4xdr.c +1 −1 Original line number Diff line number Diff line Loading @@ -6201,7 +6201,7 @@ static int nfs4_xdr_dec_lookupp(struct rpc_rqst *rqstp, struct xdr_stream *xdr, status = decode_getfh(xdr, res->fh); if (status) goto out; status = decode_getfattr_label(xdr, res->fattr, res->label, res->server); status = decode_getfattr_label(xdr, res->fattr, res->fattr->label, res->server); out: return status; } Loading
include/linux/nfs_xdr.h +1 −2 Original line number Diff line number Diff line Loading @@ -1108,7 +1108,6 @@ struct nfs4_lookupp_res { const struct nfs_server *server; struct nfs_fattr *fattr; struct nfs_fh *fh; struct nfs4_label *label; }; struct nfs4_lookup_root_arg { Loading Loading @@ -1741,7 +1740,7 @@ struct nfs_rpc_ops { int (*lookup) (struct inode *, struct dentry *, struct nfs_fh *, struct nfs_fattr *); int (*lookupp) (struct inode *, struct nfs_fh *, struct nfs_fattr *, struct nfs4_label *); struct nfs_fattr *); int (*access) (struct inode *, struct nfs_access_entry *); int (*readlink)(struct inode *, struct page *, unsigned int, unsigned int); Loading