diff mbox

[V9fs-developer] Please update commit 83771c168644f6bea4964a8b00f71bab770679f5 with the below patch

Message ID m3wrp4jmxk.fsf@linux.vnet.ibm.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Aneesh Kumar K.V Oct. 27, 2010, 4:10 a.m. UTC
None
diff mbox

Patch

diff --git a/net/9p/client.c b/net/9p/client.c
index e141e46..dbca5b3 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -1333,16 +1333,13 @@  p9_client_read(struct p9_fid *fid, char *data, char __user *udata, u64 offset,
 
 	if (data) {
 		memmove(data, dataptr, count);
-	}
-
-	if (udata) {
+	} else {
 		err = copy_to_user(udata, dataptr, count);
 		if (err) {
 			err = -EFAULT;
 			goto free_and_error;
 		}
 	}
-
 	p9_free_req(clnt, req);
 	return count;