Skip to content

Commit

Permalink
NFSv4.1: layout segment comparison helpers should take 'const' parame…
Browse files Browse the repository at this point in the history
…ters

Also strip off the unnecessary 'inline' declarations.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Jun 18, 2013
1 parent c8d74d9 commit 3cb2df1
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions fs/nfs/pnfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ pnfs_put_lseg(struct pnfs_layout_segment *lseg)
}
EXPORT_SYMBOL_GPL(pnfs_put_lseg);

static inline u64
static u64
end_offset(u64 start, u64 len)
{
u64 end;
Expand All @@ -376,9 +376,9 @@ end_offset(u64 start, u64 len)
* start2 end2
* [----------------)
*/
static inline int
lo_seg_contained(struct pnfs_layout_range *l1,
struct pnfs_layout_range *l2)
static bool
lo_seg_contained(const struct pnfs_layout_range *l1,
const struct pnfs_layout_range *l2)
{
u64 start1 = l1->offset;
u64 end1 = end_offset(start1, l1->length);
Expand All @@ -395,9 +395,9 @@ lo_seg_contained(struct pnfs_layout_range *l1,
* start2 end2
* [----------------)
*/
static inline int
lo_seg_intersecting(struct pnfs_layout_range *l1,
struct pnfs_layout_range *l2)
static bool
lo_seg_intersecting(const struct pnfs_layout_range *l1,
const struct pnfs_layout_range *l2)
{
u64 start1 = l1->offset;
u64 end1 = end_offset(start1, l1->length);
Expand All @@ -409,8 +409,8 @@ lo_seg_intersecting(struct pnfs_layout_range *l1,
}

static bool
should_free_lseg(struct pnfs_layout_range *lseg_range,
struct pnfs_layout_range *recall_range)
should_free_lseg(const struct pnfs_layout_range *lseg_range,
const struct pnfs_layout_range *recall_range)
{
return (recall_range->iomode == IOMODE_ANY ||
lseg_range->iomode == recall_range->iomode) &&
Expand Down Expand Up @@ -986,8 +986,8 @@ bool pnfs_roc_drain(struct inode *ino, u32 *barrier, struct rpc_task *task)
* are seen first.
*/
static s64
cmp_layout(struct pnfs_layout_range *l1,
struct pnfs_layout_range *l2)
cmp_layout(const struct pnfs_layout_range *l1,
const struct pnfs_layout_range *l2)
{
s64 d;

Expand Down Expand Up @@ -1093,9 +1093,9 @@ pnfs_find_alloc_layout(struct inode *ino,
* READ READ true
* READ RW true
*/
static int
is_matching_lseg(struct pnfs_layout_range *ls_range,
struct pnfs_layout_range *range)
static bool
is_matching_lseg(const struct pnfs_layout_range *ls_range,
const struct pnfs_layout_range *range)
{
struct pnfs_layout_range range1;

Expand Down

0 comments on commit 3cb2df1

Please sign in to comment.