Skip to content

Commit

Permalink
NFSv4: Don't ask for delegated attributes when adding a hard link
Browse files Browse the repository at this point in the history
Signed-off-by: Trond Myklebust <[email protected]>
  • Loading branch information
trondmypd authored and Trond Myklebust committed Jun 4, 2018
1 parent 771734f commit 2f28dc3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
struct nfs_server *server = NFS_SERVER(inode);
__u32 bitmask[NFS4_BITMASK_SZ];
struct nfs4_link_arg arg = {
.fh = NFS_FH(inode),
.dir_fh = NFS_FH(dir),
.name = name,
.bitmask = server->attr_bitmask,
.bitmask = bitmask,
};
struct nfs4_link_res res = {
.server = server,
Expand All @@ -4404,9 +4405,9 @@ static int _nfs4_proc_link(struct inode *inode, struct inode *dir, const struct
status = PTR_ERR(res.label);
goto out;
}
arg.bitmask = nfs4_bitmask(server, res.label);

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);
if (!status) {
Expand Down

0 comments on commit 2f28dc3

Please sign in to comment.