From 81851d4646111faa32417281eb00aa6233231350 Mon Sep 17 00:00:00 2001 From: Anil Belur Date: Wed, 18 Jun 2014 18:23:55 +1000 Subject: [PATCH] staging: lustre: lclient: lcommon_cl.c fixing coding style issues fixed: WARNING: line over 80 characters, used a new variable 'size_index' to store the offset. Replaced "unsigned long" with "loff_t" type for 'cur_index'. Removed the parenthesis around the second part of the if statement following the '||' as its not required. Signed-off-by: Anil Belur Signed-off-by: Greg Kroah-Hartman --- drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c index 2f51b7667b23..b8552abc6a63 100644 --- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c +++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c @@ -821,10 +821,11 @@ int ccc_prep_size(const struct lu_env *env, struct cl_object *obj, * linux-2.6.18-128.1.1 miss to do that. * --bug 17336 */ loff_t size = cl_isize_read(inode); - unsigned long cur_index = start >> PAGE_CACHE_SHIFT; + loff_t cur_index = start >> PAGE_CACHE_SHIFT; + loff_t size_index = ((size - 1) >> PAGE_CACHE_SHIFT); if ((size == 0 && cur_index != 0) || - (((size - 1) >> PAGE_CACHE_SHIFT) < cur_index)) + size_index < cur_index) *exceed = 1; } return result; -- 2.11.0