summaryrefslogtreecommitdiffstats
path: root/xlators/performance/write-behind/src
diff options
context:
space:
mode:
authorVijay Bellur <vijay@gluster.com>2009-10-14 13:48:23 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-10-15 09:03:32 -0700
commit347385beb519d75cd1457a36cf13a02fd2e60a92 (patch)
tree6217fd6d299d2f9db3c99c10d4ae950cc60a7bc8 /xlators/performance/write-behind/src
parent89b40ae93a09043e9d9384ce8c631d0c5abe6787 (diff)
performance/write-behind:STACK_UNWIND happens only in failure path of wb_stat()
Only in case of errors STACK_UNWIND happens in wb_stat(). Also, fixed an incorrect check which would fail all writes. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 309 (In replicate set-up when exnihilate.sh is run , client crashes.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=309
Diffstat (limited to 'xlators/performance/write-behind/src')
-rw-r--r--xlators/performance/write-behind/src/write-behind.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c
index 769fb507d99..0ea1ee328fa 100644
--- a/xlators/performance/write-behind/src/write-behind.c
+++ b/xlators/performance/write-behind/src/write-behind.c
@@ -643,6 +643,7 @@ wb_stat (call_frame_t *frame, xlator_t *this, loc_t *loc)
FIRST_CHILD(this)->fops->stat,
loc);
}
+ return 0;
unwind:
STACK_UNWIND_STRICT (stat, frame, -1, op_errno, NULL);
@@ -1828,7 +1829,7 @@ wb_writev (call_frame_t *frame, xlator_t *this, fd_t *fd, struct iovec *vector,
}
file = (wb_file_t *)(long)tmp_file;
- if ((!S_ISDIR (fd->inode->st_mode)) && (file != NULL)) {
+ if ((!S_ISDIR (fd->inode->st_mode)) && (file == NULL)) {
gf_log (this->name, GF_LOG_DEBUG,
"wb_file not found for fd %p", fd);
op_errno = EBADFD;