diff options
author | Anand V. Avati <avati@amp.gluster.com> | 2009-04-22 04:01:06 +0530 |
---|---|---|
committer | Anand V. Avati <avati@amp.gluster.com> | 2009-04-22 13:07:40 +0530 |
commit | 4877476fa1a591c51f4b3ee76082766f38a33b23 (patch) | |
tree | 95ebe6bc557e2b362ba36c0a5e7a32613aeb890e /xlators | |
parent | bc1dff620cc185c3e08853b9b7fb4c5a04c48ebe (diff) |
0-byte write guard
guard server_writev from 0-byte writes from client where iobuf will be NULL. This is possible only via libglusterfsclient (not fuse)
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/protocol/server/src/server-protocol.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/protocol/server/src/server-protocol.c b/xlators/protocol/server/src/server-protocol.c index 9bba95544..78ca63523 100644 --- a/xlators/protocol/server/src/server-protocol.c +++ b/xlators/protocol/server/src/server-protocol.c @@ -4211,7 +4211,8 @@ server_writev (call_frame_t *frame, xlator_t *bound_xl, GF_VALIDATE_OR_GOTO(bound_xl->name, state->fd, fail); - iov.iov_base = iobuf->ptr; + if (iobuf) + iov.iov_base = iobuf->ptr; iov.iov_len = state->size; iobref = iobref_new (); |