diff options
author | Pranith Kumar K <pranithk@gluster.com> | 2010-08-17 05:06:58 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-08-17 11:18:07 -0700 |
commit | ed180da84f153b47373e109f445f6775f950cb69 (patch) | |
tree | 4f3083c0da5c77879581cee87450307b3d5ae87c /xlators/features/locks | |
parent | 20cdb9ab09b96e92a2ded9999078b8462dffd8c1 (diff) |
cluster/afr: Return correct flock structures correctly in lk fops
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 1042 (Use correct flock structures in lk fops)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1042
Diffstat (limited to 'xlators/features/locks')
-rw-r--r-- | xlators/features/locks/src/posix.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/features/locks/src/posix.c b/xlators/features/locks/src/posix.c index 0db7623c3d3..9d4f01a11ec 100644 --- a/xlators/features/locks/src/posix.c +++ b/xlators/features/locks/src/posix.c @@ -761,6 +761,12 @@ pl_lk (call_frame_t *frame, xlator_t *this, client_pid = frame->root->pid; owner = frame->root->lk_owner; + if ((flock->l_start < 0) || (flock->l_len < 0)) { + op_ret = -1; + op_errno = EINVAL; + goto unwind; + } + pl_inode = pl_inode_get (this, fd->inode); if (!pl_inode) { gf_log (this->name, GF_LOG_ERROR, |