diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/xfs_inode.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index 3ca5d43b8345..8fdd30d9ba56 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include "xfs_quota.h" | 49 | #include "xfs_quota.h" |
50 | #include "xfs_acl.h" | 50 | #include "xfs_acl.h" |
51 | 51 | ||
52 | #include <linux/log2.h> | ||
52 | 53 | ||
53 | kmem_zone_t *xfs_ifork_zone; | 54 | kmem_zone_t *xfs_ifork_zone; |
54 | kmem_zone_t *xfs_inode_zone; | 55 | kmem_zone_t *xfs_inode_zone; |
@@ -4184,7 +4185,7 @@ xfs_iext_realloc_direct( | |||
4184 | ifp->if_bytes = new_size; | 4185 | ifp->if_bytes = new_size; |
4185 | return; | 4186 | return; |
4186 | } | 4187 | } |
4187 | if ((new_size & (new_size - 1)) != 0) { | 4188 | if (!is_power_of_2(new_size)){ |
4188 | rnew_size = xfs_iroundup(new_size); | 4189 | rnew_size = xfs_iroundup(new_size); |
4189 | } | 4190 | } |
4190 | if (rnew_size != ifp->if_real_bytes) { | 4191 | if (rnew_size != ifp->if_real_bytes) { |
@@ -4207,7 +4208,7 @@ xfs_iext_realloc_direct( | |||
4207 | */ | 4208 | */ |
4208 | else { | 4209 | else { |
4209 | new_size += ifp->if_bytes; | 4210 | new_size += ifp->if_bytes; |
4210 | if ((new_size & (new_size - 1)) != 0) { | 4211 | if (!is_power_of_2(new_size)) { |
4211 | rnew_size = xfs_iroundup(new_size); | 4212 | rnew_size = xfs_iroundup(new_size); |
4212 | } | 4213 | } |
4213 | xfs_iext_inline_to_direct(ifp, rnew_size); | 4214 | xfs_iext_inline_to_direct(ifp, rnew_size); |