summaryrefslogtreecommitdiffstats
path: root/fs/nfs/pnfs.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2013-06-03 11:24:36 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2013-06-18 13:47:18 -0400
commit3cb2df17aeb9aee1b3b209cae0ba00f356c8ad95 (patch)
treeab32f78bf19b324b97d642b1703a86f473f56fc8 /fs/nfs/pnfs.c
parentc8d74d9b68b655e85ee4603f8918c3233a74f085 (diff)
NFSv4.1: layout segment comparison helpers should take 'const' parameters
Also strip off the unnecessary 'inline' declarations. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/pnfs.c')
-rw-r--r--fs/nfs/pnfs.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 7bb03c1da234..4b22135708e8 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -360,7 +360,7 @@ pnfs_put_lseg(struct pnfs_layout_segment *lseg)
360} 360}
361EXPORT_SYMBOL_GPL(pnfs_put_lseg); 361EXPORT_SYMBOL_GPL(pnfs_put_lseg);
362 362
363static inline u64 363static u64
364end_offset(u64 start, u64 len) 364end_offset(u64 start, u64 len)
365{ 365{
366 u64 end; 366 u64 end;
@@ -376,9 +376,9 @@ end_offset(u64 start, u64 len)
376 * start2 end2 376 * start2 end2
377 * [----------------) 377 * [----------------)
378 */ 378 */
379static inline int 379static bool
380lo_seg_contained(struct pnfs_layout_range *l1, 380lo_seg_contained(const struct pnfs_layout_range *l1,
381 struct pnfs_layout_range *l2) 381 const struct pnfs_layout_range *l2)
382{ 382{
383 u64 start1 = l1->offset; 383 u64 start1 = l1->offset;
384 u64 end1 = end_offset(start1, l1->length); 384 u64 end1 = end_offset(start1, l1->length);
@@ -395,9 +395,9 @@ lo_seg_contained(struct pnfs_layout_range *l1,
395 * start2 end2 395 * start2 end2
396 * [----------------) 396 * [----------------)
397 */ 397 */
398static inline int 398static bool
399lo_seg_intersecting(struct pnfs_layout_range *l1, 399lo_seg_intersecting(const struct pnfs_layout_range *l1,
400 struct pnfs_layout_range *l2) 400 const struct pnfs_layout_range *l2)
401{ 401{
402 u64 start1 = l1->offset; 402 u64 start1 = l1->offset;
403 u64 end1 = end_offset(start1, l1->length); 403 u64 end1 = end_offset(start1, l1->length);
@@ -409,8 +409,8 @@ lo_seg_intersecting(struct pnfs_layout_range *l1,
409} 409}
410 410
411static bool 411static bool
412should_free_lseg(struct pnfs_layout_range *lseg_range, 412should_free_lseg(const struct pnfs_layout_range *lseg_range,
413 struct pnfs_layout_range *recall_range) 413 const struct pnfs_layout_range *recall_range)
414{ 414{
415 return (recall_range->iomode == IOMODE_ANY || 415 return (recall_range->iomode == IOMODE_ANY ||
416 lseg_range->iomode == recall_range->iomode) && 416 lseg_range->iomode == recall_range->iomode) &&
@@ -986,8 +986,8 @@ out:
986 * are seen first. 986 * are seen first.
987 */ 987 */
988static s64 988static s64
989cmp_layout(struct pnfs_layout_range *l1, 989cmp_layout(const struct pnfs_layout_range *l1,
990 struct pnfs_layout_range *l2) 990 const struct pnfs_layout_range *l2)
991{ 991{
992 s64 d; 992 s64 d;
993 993
@@ -1093,9 +1093,9 @@ out_existing:
1093 * READ READ true 1093 * READ READ true
1094 * READ RW true 1094 * READ RW true
1095 */ 1095 */
1096static int 1096static bool
1097is_matching_lseg(struct pnfs_layout_range *ls_range, 1097is_matching_lseg(const struct pnfs_layout_range *ls_range,
1098 struct pnfs_layout_range *range) 1098 const struct pnfs_layout_range *range)
1099{ 1099{
1100 struct pnfs_layout_range range1; 1100 struct pnfs_layout_range range1;
1101 1101