From 3ac6ffd6c25184309c2e0116d15dca183877cae3 Mon Sep 17 00:00:00 2001 From: bobijam Date: Mon, 12 Oct 2009 13:37:12 +0000 Subject: [PATCH] Branch b1_8 b=19720 i=joahnn i=andrew.perepechko (panda) Fix some compile warnings. --- lustre/include/lprocfs_status.h | 10 +++++----- lustre/osc/osc_request.c | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lustre/include/lprocfs_status.h b/lustre/include/lprocfs_status.h index 0c957e1..ee166cd 100644 --- a/lustre/include/lprocfs_status.h +++ b/lustre/include/lprocfs_status.h @@ -542,8 +542,8 @@ extern struct rw_semaphore _lprocfs_lock; /* to begin from 2.6.23, Linux defines self file_operations (proc_reg_file_ops) * in procfs, the proc file_operation defined by Lustre (lprocfs_generic_fops) - * will be wrapped into the new defined proc_reg_file_ops, which instroduces - * user count in proc_dir_entrey(pde_users) to protect the proc entry from + * will be wrapped into the new defined proc_reg_file_ops, which instroduces + * user count in proc_dir_entrey(pde_users) to protect the proc entry from * being deleted. then the protection lock (_lprocfs_lock) defined by Lustre * isn't necessary anymore for lprocfs_generic_fops(e.g. lprocfs_fops_read). * see bug19706 for detailed information. @@ -579,7 +579,7 @@ extern struct rw_semaphore _lprocfs_lock; } while(0) #define LPROCFS_CHECK_DELETED(dp) ((dp)->deleted) -#elif HAVE_PROCFS_USERS +#elif defined HAVE_PROCFS_USERS #define LPROCFS_CHECK_DELETED(dp) ({ \ int deleted = 0; \ @@ -589,14 +589,14 @@ extern struct rw_semaphore _lprocfs_lock; spin_unlock(&(dp)->pde_unload_lock); \ deleted; \ }) - + #define LPROCFS_ENTRY_AND_CHECK(dp) do { \ if (LPROCFS_CHECK_DELETED(dp)) \ return -ENODEV; \ } while(0) #else - + #define LPROCFS_ENTRY_AND_CHECK(dp) \ LPROCFS_ENTRY(); #define LPROCFS_CHECK_DELETED(dp) (0) diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index ab0e243..c890c71 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -3597,13 +3597,13 @@ static int osc_statfs_interpret(struct ptlrpc_request *req, * avail < ~0.1% max max = avail + used * 1025 * avail < avail + used used = blocks - free * 1024 * avail < used - * 1024 * avail < blocks - free - * avail < ((blocks - free) >> 10) + * 1024 * avail < blocks - free + * avail < ((blocks - free) >> 10) * * On very large disk, say 16TB 0.1% will be 16 GB. We don't want to * lose that amount of space so in those cases we report no space left * if their is less than 1 GB left. */ - used = min((msfs->os_blocks - msfs->os_bfree) >> 10, 1 << 30); + used = min_t(__u64, (msfs->os_blocks - msfs->os_bfree) >> 10, 1 << 30); if (unlikely(((cli->cl_oscc.oscc_flags & OSCC_FLAG_NOSPC) == 0) && ((msfs->os_ffree < 32) || (msfs->os_bavail < used)))) cli->cl_oscc.oscc_flags |= OSCC_FLAG_NOSPC; -- 1.8.3.1