diff options
Diffstat (limited to 'fs/btrfs/compat.h')
-rw-r--r-- | fs/btrfs/compat.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/compat.h b/fs/btrfs/compat.h index 12fb9f803c3..be4f4e7a706 100644 --- a/fs/btrfs/compat.h +++ b/fs/btrfs/compat.h @@ -68,4 +68,9 @@ static inline void uuid_unparse(const u8 *uuid, char *out) return uuid_bin_to_str((unsigned char *)uuid, out, 0); } +static inline int is_power_of_2(unsigned long n) +{ + return (n != 0 && ((n & (n - 1)) == 0)); +} + #endif |