[PATCH 14/16] NFS in copy use stateid returned by copy_notify

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Olga Kornievskaia <kolga@xxxxxxxxxx>

Signed-off-by: Olga Kornievskaia <kolga@xxxxxxxxxx>
---
 fs/nfs/nfs42proc.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c
index 42cab7e..e33734d 100644
--- a/fs/nfs/nfs42proc.c
+++ b/fs/nfs/nfs42proc.c
@@ -191,15 +191,17 @@ static ssize_t nfs42_proc_copy(struct file *src, loff_t pos_src,
 			args.cp_src[0].u.nl4_addr.na_netid,
 			args.cp_src[0].u.nl4_addr.na_uaddr_len,
 			args.cp_src[0].u.nl4_addr.na_uaddr);
+
+		nfs4_stateid_copy(&args.src_stateid, &cn_res->cnr_stateid);
+	} else {
+		status = nfs42_set_rw_stateid(&args.src_stateid, src, FMODE_READ);
+		if (status)
+			return status;
 	}
 
 	if (!(server->caps & NFS_CAP_COPY))
 		return -ENOTSUPP;
 
-	status = nfs42_set_rw_stateid(&args.src_stateid, src, FMODE_READ);
-	if (status)
-		return status;
-
 	status = nfs42_set_rw_stateid(&args.dst_stateid, dst, FMODE_WRITE);
 	if (status)
 		return status;
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux