diff options
Diffstat (limited to 'fs/ufs/balloc.c')
-rw-r--r-- | fs/ufs/balloc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/ufs/balloc.c b/fs/ufs/balloc.c index 46f7a807bbc1..42694e11c23d 100644 --- a/fs/ufs/balloc.c +++ b/fs/ufs/balloc.c | |||
@@ -424,8 +424,7 @@ u64 ufs_new_fragments(struct inode *inode, void *p, u64 fragment, | |||
424 | ufs_cpu_to_data_ptr(sb, p, result); | 424 | ufs_cpu_to_data_ptr(sb, p, result); |
425 | *err = 0; | 425 | *err = 0; |
426 | UFS_I(inode)->i_lastfrag = | 426 | UFS_I(inode)->i_lastfrag = |
427 | max_t(u32, UFS_I(inode)->i_lastfrag, | 427 | max(UFS_I(inode)->i_lastfrag, fragment + count); |
428 | fragment + count); | ||
429 | ufs_clear_frags(inode, result + oldcount, | 428 | ufs_clear_frags(inode, result + oldcount, |
430 | newcount - oldcount, locked_page != NULL); | 429 | newcount - oldcount, locked_page != NULL); |
431 | } | 430 | } |
@@ -440,7 +439,8 @@ u64 ufs_new_fragments(struct inode *inode, void *p, u64 fragment, | |||
440 | result = ufs_add_fragments (inode, tmp, oldcount, newcount, err); | 439 | result = ufs_add_fragments (inode, tmp, oldcount, newcount, err); |
441 | if (result) { | 440 | if (result) { |
442 | *err = 0; | 441 | *err = 0; |
443 | UFS_I(inode)->i_lastfrag = max_t(u32, UFS_I(inode)->i_lastfrag, fragment + count); | 442 | UFS_I(inode)->i_lastfrag = max(UFS_I(inode)->i_lastfrag, |
443 | fragment + count); | ||
444 | ufs_clear_frags(inode, result + oldcount, newcount - oldcount, | 444 | ufs_clear_frags(inode, result + oldcount, newcount - oldcount, |
445 | locked_page != NULL); | 445 | locked_page != NULL); |
446 | unlock_super(sb); | 446 | unlock_super(sb); |
@@ -479,7 +479,8 @@ u64 ufs_new_fragments(struct inode *inode, void *p, u64 fragment, | |||
479 | uspi->s_sbbase + result, locked_page); | 479 | uspi->s_sbbase + result, locked_page); |
480 | ufs_cpu_to_data_ptr(sb, p, result); | 480 | ufs_cpu_to_data_ptr(sb, p, result); |
481 | *err = 0; | 481 | *err = 0; |
482 | UFS_I(inode)->i_lastfrag = max_t(u32, UFS_I(inode)->i_lastfrag, fragment + count); | 482 | UFS_I(inode)->i_lastfrag = max(UFS_I(inode)->i_lastfrag, |
483 | fragment + count); | ||
483 | unlock_super(sb); | 484 | unlock_super(sb); |
484 | if (newcount < request) | 485 | if (newcount < request) |
485 | ufs_free_fragments (inode, result + newcount, request - newcount); | 486 | ufs_free_fragments (inode, result + newcount, request - newcount); |