From 5b91c662c9c2db92d903cd5e6660822d43b28df1 Mon Sep 17 00:00:00 2001 From: Olga Kornievskaia Date: Wed, 8 Feb 2012 18:33:37 -0500 Subject: [PATCH] removing unused arg from nfs41_link --- daemon/nfs41_ops.c | 12 ++++-------- daemon/nfs41_ops.h | 1 - daemon/setattr.c | 4 ++-- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/daemon/nfs41_ops.c b/daemon/nfs41_ops.c index 81bf06e..db86d51 100644 --- a/daemon/nfs41_ops.c +++ b/daemon/nfs41_ops.c @@ -1385,7 +1385,6 @@ int nfs41_link( IN nfs41_path_fh *src, IN nfs41_path_fh *dst_dir, IN const nfs41_component *target, - OUT OPTIONAL nfs41_path_fh *link_out, OUT nfs41_file_info *cinfo) { int status; @@ -1407,9 +1406,6 @@ int nfs41_link( nfs41_file_info info = { 0 }; nfs41_path_fh file; - if (link_out == NULL) - link_out = &file; - init_getattr_request(&info.attrmask); init_getattr_request(&cinfo->attrmask); cinfo->attrmask.arr[0] |= FATTR4_WORD0_FSID; @@ -1454,7 +1450,7 @@ int nfs41_link( /* GETFH(target) */ compound_add_op(&compound, OP_GETFH, NULL, &getfh_res); - getfh_res.fh = &link_out->fh; + getfh_res.fh = &file.fh; status = compound_encode_send_decode(session, &compound, TRUE); if (status) @@ -1464,9 +1460,9 @@ int nfs41_link( goto out; /* fill in the file handle's fileid and superblock */ - link_out->fh.fileid = cinfo->fileid; + file.fh.fileid = cinfo->fileid; status = nfs41_superblock_for_fh(session, - &cinfo->fsid, &dst_dir->fh, link_out); + &cinfo->fsid, &dst_dir->fh, &file); if (status) goto out; @@ -1481,7 +1477,7 @@ int nfs41_link( sizeof(bitmap4)); AcquireSRWLockShared(&dst_dir->path->lock); nfs41_name_cache_insert(session_name_cache(session), - dst_dir->path->path, target, &link_out->fh, + dst_dir->path->path, target, &file.fh, cinfo, &link_res.cinfo, OPEN_DELEGATE_NONE); ReleaseSRWLockShared(&dst_dir->path->lock); diff --git a/daemon/nfs41_ops.h b/daemon/nfs41_ops.h index 696cc84..4e40086 100644 --- a/daemon/nfs41_ops.h +++ b/daemon/nfs41_ops.h @@ -1170,7 +1170,6 @@ int nfs41_link( IN nfs41_path_fh *src, IN nfs41_path_fh *dst_dir, IN const nfs41_component *target, - OUT OPTIONAL nfs41_path_fh *link_out, OUT nfs41_file_info *cinfo); /* symlink.c */ diff --git a/daemon/setattr.c b/daemon/setattr.c index 3d2bfb3..c9a577c 100644 --- a/daemon/setattr.c +++ b/daemon/setattr.c @@ -451,8 +451,8 @@ static int handle_nfs41_link(setattr_upcall_args *args) nfs41_delegation_return(state->session, &state->file, OPEN_DELEGATE_READ, FALSE); - status = nfs41_link(state->session, &state->file, - &dst_dir, &dst_name, NULL, &info); + status = nfs41_link(state->session, &state->file, &dst_dir, &dst_name, + &info); if (status) { dprintf(1, "nfs41_link() failed with error %s.\n", nfs_error_string(status));