summaryrefslogtreecommitdiffstats
path: root/xlators/performance/stat-prefetch/src/stat-prefetch.c
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2011-02-22 05:25:30 +0000
committerAnand V. Avati <avati@dev.gluster.com>2011-02-22 09:22:05 -0800
commit991b61661d74de5b1349050308dbd131e0de607c (patch)
tree9daf91fd09bb805ab6140fcddb89db9dd4ce4cb2 /xlators/performance/stat-prefetch/src/stat-prefetch.c
parent21e4db42468d5bb7ebd9fa6a91461edd11b2a6da (diff)
check the op_ret for less than zero in sp_create_cbk since posix can send negative values other than -1
posix can send -ve values other than -1 in create: op_ret = setgid_override (this, real_path, &gid); if (op_ret < 0) { goto out; } In stat-prefetch we check op_ret only for -1 which results in function proceeding and op_ret may become 0 due to other function calls in sp_create_cbk, hence crashes in fuse. Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2409 (crash in stat prefetch) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2409
Diffstat (limited to 'xlators/performance/stat-prefetch/src/stat-prefetch.c')
-rw-r--r--xlators/performance/stat-prefetch/src/stat-prefetch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/performance/stat-prefetch/src/stat-prefetch.c b/xlators/performance/stat-prefetch/src/stat-prefetch.c
index ac0646c44..3d82174fe 100644
--- a/xlators/performance/stat-prefetch/src/stat-prefetch.c
+++ b/xlators/performance/stat-prefetch/src/stat-prefetch.c
@@ -1477,7 +1477,7 @@ sp_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
sp_fd_ctx_t *fd_ctx = NULL;
char lookup_in_progress = 0, looked_up = 0;
- if (op_ret == -1) {
+ if (op_ret < 0) {
goto out;
}