summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2009-10-15 08:39:01 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-10-15 09:19:20 -0700
commitb78fa55bbbb645d4a9ac58ff7f6b59684dfa83d4 (patch)
treef8daf5b30485437ac41c6b19d95c12073b60b4b6
parent680164e64ab9a3817364626cd27cdc997ca16414 (diff)
performance/quick-read: frame->local need not be set in qr_open_cbk.
- local is used only by certain operations and hence it need not be set by all the operations invoking open. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 323 (fd leak with quick-read loaded in translator tree) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=323
-rw-r--r--xlators/performance/quick-read/src/quick-read.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/xlators/performance/quick-read/src/quick-read.c b/xlators/performance/quick-read/src/quick-read.c
index 54367a3fd..2c54b559e 100644
--- a/xlators/performance/quick-read/src/quick-read.c
+++ b/xlators/performance/quick-read/src/quick-read.c
@@ -344,10 +344,7 @@ qr_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret,
char is_open = 0;
local = frame->local;
- if (local == NULL) {
- op_ret = -1;
- op_errno = EINVAL;
- } else {
+ if (local != NULL) {
local->op_ret = op_ret;
local->op_errno = op_errno;
is_open = local->is_open;