diff options
| -rw-r--r-- | fs/btrfs/ioctl.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 1d04b5559e61..64a0876c7872 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
| @@ -368,8 +368,13 @@ static noinline int btrfs_ioctl_fitrim(struct file *file, void __user *arg) | |||
| 368 | 368 | ||
| 369 | int btrfs_is_empty_uuid(u8 *uuid) | 369 | int btrfs_is_empty_uuid(u8 *uuid) |
| 370 | { | 370 | { |
| 371 | BUILD_BUG_ON(BTRFS_UUID_SIZE > PAGE_SIZE); | 371 | int i; |
| 372 | return !memcmp(uuid, empty_zero_page, BTRFS_UUID_SIZE); | 372 | |
| 373 | for (i = 0; i < BTRFS_UUID_SIZE; i++) { | ||
| 374 | if (uuid[i]) | ||
| 375 | return 0; | ||
| 376 | } | ||
| 377 | return 1; | ||
| 373 | } | 378 | } |
| 374 | 379 | ||
| 375 | static noinline int create_subvol(struct inode *dir, | 380 | static noinline int create_subvol(struct inode *dir, |
