diff options
author | Fabian Frederick <fabf@skynet.be> | 2014-05-19 15:36:58 -0400 |
---|---|---|
committer | Dave Kleikamp <dave.kleikamp@oracle.com> | 2014-06-03 15:14:00 -0400 |
commit | 4f65b6dbc7e8e35369e3f0b9bc80e703c3ad9dbf (patch) | |
tree | ffd9c6c1c55fb3d8341a22ee102c31374d950fd2 /fs/jfs/jfs_dmap.c | |
parent | 789602e95d5ceb4c08b673fe4b39aa109bc66527 (diff) |
fs/jfs/jfs_dmap.c: replace min/casting by min_t
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'fs/jfs/jfs_dmap.c')
-rw-r--r-- | fs/jfs/jfs_dmap.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c index 370d7b6c5942..2d514c7affc2 100644 --- a/fs/jfs/jfs_dmap.c +++ b/fs/jfs/jfs_dmap.c | |||
@@ -1208,7 +1208,7 @@ static int dbAllocNext(struct bmap * bmp, struct dmap * dp, s64 blkno, | |||
1208 | * by this leaf. | 1208 | * by this leaf. |
1209 | */ | 1209 | */ |
1210 | l2size = | 1210 | l2size = |
1211 | min((int)leaf[word], NLSTOL2BSZ(nwords)); | 1211 | min_t(int, leaf[word], NLSTOL2BSZ(nwords)); |
1212 | 1212 | ||
1213 | /* determine how many words were handled. | 1213 | /* determine how many words were handled. |
1214 | */ | 1214 | */ |
@@ -1902,7 +1902,7 @@ dbAllocCtl(struct bmap * bmp, s64 nblocks, int l2nb, s64 blkno, s64 * results) | |||
1902 | 1902 | ||
1903 | /* determine how many blocks to allocate from this dmap. | 1903 | /* determine how many blocks to allocate from this dmap. |
1904 | */ | 1904 | */ |
1905 | nb = min(n, (s64)BPERDMAP); | 1905 | nb = min_t(s64, n, BPERDMAP); |
1906 | 1906 | ||
1907 | /* allocate the blocks from the dmap. | 1907 | /* allocate the blocks from the dmap. |
1908 | */ | 1908 | */ |
@@ -2260,7 +2260,8 @@ static void dbAllocBits(struct bmap * bmp, struct dmap * dp, s64 blkno, | |||
2260 | * of bits being allocated and the l2 number | 2260 | * of bits being allocated and the l2 number |
2261 | * of bits currently described by this leaf. | 2261 | * of bits currently described by this leaf. |
2262 | */ | 2262 | */ |
2263 | size = min((int)leaf[word], NLSTOL2BSZ(nwords)); | 2263 | size = min_t(int, leaf[word], |
2264 | NLSTOL2BSZ(nwords)); | ||
2264 | 2265 | ||
2265 | /* update the leaf to reflect the allocation. | 2266 | /* update the leaf to reflect the allocation. |
2266 | * in addition to setting the leaf value to | 2267 | * in addition to setting the leaf value to |
@@ -3563,7 +3564,7 @@ int dbExtendFS(struct inode *ipbmap, s64 blkno, s64 nblocks) | |||
3563 | if (mp == NULL) | 3564 | if (mp == NULL) |
3564 | goto errout; | 3565 | goto errout; |
3565 | 3566 | ||
3566 | n = min(nblocks, (s64)BPERDMAP); | 3567 | n = min_t(s64, nblocks, BPERDMAP); |
3567 | } | 3568 | } |
3568 | 3569 | ||
3569 | dp = (struct dmap *) mp->data; | 3570 | dp = (struct dmap *) mp->data; |