Commit 2f28dc38 authored by Trond Myklebust's avatar Trond Myklebust Committed by Trond Myklebust

NFSv4: Don't ask for delegated attributes when adding a hard link

Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent 771734f2
...@@ -4378,11 +4378,12 @@ static int nfs4_proc_rename_done(struct rpc_task *task, struct inode *old_dir, ...@@ -4378,11 +4378,12 @@ static int nfs4_proc_rename_done(struct rpc_task *task, struct inode *old_dir,
static int _nfs4_proc_link(struct inode *inode, struct inode *dir, const struct qstr *name) static int _nfs4_proc_link(struct inode *inode, struct inode *dir, const struct qstr *name)
{ {
struct nfs_server *server = NFS_SERVER(inode); struct nfs_server *server = NFS_SERVER(inode);
__u32 bitmask[NFS4_BITMASK_SZ];
struct nfs4_link_arg arg = { struct nfs4_link_arg arg = {
.fh = NFS_FH(inode), .fh = NFS_FH(inode),
.dir_fh = NFS_FH(dir), .dir_fh = NFS_FH(dir),
.name = name, .name = name,
.bitmask = server->attr_bitmask, .bitmask = bitmask,
}; };
struct nfs4_link_res res = { struct nfs4_link_res res = {
.server = server, .server = server,
...@@ -4404,9 +4405,9 @@ static int _nfs4_proc_link(struct inode *inode, struct inode *dir, const struct ...@@ -4404,9 +4405,9 @@ static int _nfs4_proc_link(struct inode *inode, struct inode *dir, const struct
status = PTR_ERR(res.label); status = PTR_ERR(res.label);
goto out; goto out;
} }
arg.bitmask = nfs4_bitmask(server, res.label);
nfs4_inode_make_writeable(inode); nfs4_inode_make_writeable(inode);
nfs4_bitmap_copy_adjust_setattr(bitmask, nfs4_bitmask(server, res.label), inode);
status = nfs4_call_sync(server->client, server, &msg, &arg.seq_args, &res.seq_res, 1); status = nfs4_call_sync(server->client, server, &msg, &arg.seq_args, &res.seq_res, 1);
if (!status) { if (!status) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment