From 2c5a280f9a7ad7eb971db4d55e6ce806c5cdd6bc Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Tue, 27 Apr 2010 07:44:45 +0000 Subject: cluster/dht: perform inode number overwrite in readv_cbk iatt with checks Signed-off-by: Anand V. Avati Signed-off-by: Anand V. Avati BUG: 862 (Crash in dht_readv_cbk with error-gen) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=862 --- xlators/cluster/dht/src/dht-common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xlators/cluster/dht/src/dht-common.c') diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 050a031232c..043ef5bdd70 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -1750,7 +1750,9 @@ dht_readv_cbk (call_frame_t *frame, void *cookie, xlator_t *this, op_errno = EINVAL; goto out; } - stbuf->ia_ino = local->ia_ino; + + if (op_ret != -1) + stbuf->ia_ino = local->ia_ino; out: DHT_STACK_UNWIND (readv, frame, op_ret, op_errno, vector, count, stbuf, iobref); -- cgit