diff options
author | Soumya Koduri <skoduri@redhat.com> | 2018-11-09 02:29:52 -0500 |
---|---|---|
committer | Shyamsundar Ranganathan <srangana@redhat.com> | 2018-12-26 16:59:17 +0000 |
commit | 70e254333f952a670061632a16b897928b7e670d (patch) | |
tree | ab3b84dd997937818d4e92eb59ef9551a50ba377 /xlators | |
parent | 1eef0a0f398413145063b1b8690213ca3aa31800 (diff) |
afr: open_ftruncate_cbk should read fd from local->cont.open struct
afr_open stores the fd as part of its local->cont.open struct
but when it calls ftruncate (if open flags contain O_TRUNC), the
corresponding cbk function (afr_ open_ftruncate_cbk) is
incorrectly referencing uninitialized local->fd. This patch fixes
the same.
Change-Id: Icbdedbd1b8cfea11d8f41b6e5c4cb4b44d989aba
updates: bz#1655527
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/cluster/afr/src/afr-open.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-open.c b/xlators/cluster/afr/src/afr-open.c index 3057deed604..0965d4b9eb4 100644 --- a/xlators/cluster/afr/src/afr-open.c +++ b/xlators/cluster/afr/src/afr-open.c @@ -59,7 +59,7 @@ afr_open_ftruncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this, afr_local_t * local = frame->local; AFR_STACK_UNWIND (open, frame, local->op_ret, local->op_errno, - local->fd, xdata); + local->cont.open.fd, xdata); return 0; } |