From c09dfc5f604271ecda9acf596b011dc639db2ddf Mon Sep 17 00:00:00 2001 From: Vikas Gorur Date: Tue, 11 Aug 2009 04:59:29 +0000 Subject: features/locks: Fix reverse logic in posix_lock_to_flock if the lock's end point is LLONG_MAX, the corresponding struct flock's len must be 0. Previous code had LLONG_MAX and 0 reversed. Signed-off-by: Anand V. Avati --- xlators/features/locks/src/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xlators/features') diff --git a/xlators/features/locks/src/common.c b/xlators/features/locks/src/common.c index 92441bde0..1f10aa20c 100644 --- a/xlators/features/locks/src/common.c +++ b/xlators/features/locks/src/common.c @@ -139,8 +139,8 @@ posix_lock_to_flock (posix_lock_t *lock, struct flock *flock) flock->l_type = lock->fl_type; flock->l_start = lock->fl_start; - if (lock->fl_end == 0) - flock->l_len = LLONG_MAX; + if (lock->fl_end == LLONG_MAX) + flock->l_len = 0; else flock->l_len = lock->fl_end - lock->fl_start + 1; } -- cgit