aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r--fs/btrfs/ioctl.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index e1835f8eec93..01dccb4a70bb 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -416,7 +416,7 @@ static noinline int create_subvol(struct btrfs_root *root,
416 BUG_ON(ret); 416 BUG_ON(ret);
417 417
418 ret = btrfs_insert_dir_item(trans, root, 418 ret = btrfs_insert_dir_item(trans, root,
419 name, namelen, dir->i_ino, &key, 419 name, namelen, btrfs_ino(dir), &key,
420 BTRFS_FT_DIR, index); 420 BTRFS_FT_DIR, index);
421 if (ret) 421 if (ret)
422 goto fail; 422 goto fail;
@@ -427,7 +427,7 @@ static noinline int create_subvol(struct btrfs_root *root,
427 427
428 ret = btrfs_add_root_ref(trans, root->fs_info->tree_root, 428 ret = btrfs_add_root_ref(trans, root->fs_info->tree_root,
429 objectid, root->root_key.objectid, 429 objectid, root->root_key.objectid,
430 dir->i_ino, index, name, namelen); 430 btrfs_ino(dir), index, name, namelen);
431 431
432 BUG_ON(ret); 432 BUG_ON(ret);
433 433
@@ -1123,7 +1123,7 @@ static noinline int btrfs_ioctl_subvol_getflags(struct file *file,
1123 int ret = 0; 1123 int ret = 0;
1124 u64 flags = 0; 1124 u64 flags = 0;
1125 1125
1126 if (inode->i_ino != BTRFS_FIRST_FREE_OBJECTID) 1126 if (btrfs_ino(inode) != BTRFS_FIRST_FREE_OBJECTID)
1127 return -EINVAL; 1127 return -EINVAL;
1128 1128
1129 down_read(&root->fs_info->subvol_sem); 1129 down_read(&root->fs_info->subvol_sem);
@@ -1150,7 +1150,7 @@ static noinline int btrfs_ioctl_subvol_setflags(struct file *file,
1150 if (root->fs_info->sb->s_flags & MS_RDONLY) 1150 if (root->fs_info->sb->s_flags & MS_RDONLY)
1151 return -EROFS; 1151 return -EROFS;
1152 1152
1153 if (inode->i_ino != BTRFS_FIRST_FREE_OBJECTID) 1153 if (btrfs_ino(inode) != BTRFS_FIRST_FREE_OBJECTID)
1154 return -EINVAL; 1154 return -EINVAL;
1155 1155
1156 if (copy_from_user(&flags, arg, sizeof(flags))) 1156 if (copy_from_user(&flags, arg, sizeof(flags)))
@@ -1633,7 +1633,7 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file,
1633 goto out_dput; 1633 goto out_dput;
1634 } 1634 }
1635 1635
1636 if (inode->i_ino != BTRFS_FIRST_FREE_OBJECTID) { 1636 if (btrfs_ino(inode) != BTRFS_FIRST_FREE_OBJECTID) {
1637 err = -EINVAL; 1637 err = -EINVAL;
1638 goto out_dput; 1638 goto out_dput;
1639 } 1639 }
@@ -1919,7 +1919,7 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd,
1919 } 1919 }
1920 1920
1921 /* clone data */ 1921 /* clone data */
1922 key.objectid = src->i_ino; 1922 key.objectid = btrfs_ino(src);
1923 key.type = BTRFS_EXTENT_DATA_KEY; 1923 key.type = BTRFS_EXTENT_DATA_KEY;
1924 key.offset = 0; 1924 key.offset = 0;
1925 1925
@@ -1946,7 +1946,7 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd,
1946 1946
1947 btrfs_item_key_to_cpu(leaf, &key, slot); 1947 btrfs_item_key_to_cpu(leaf, &key, slot);
1948 if (btrfs_key_type(&key) > BTRFS_EXTENT_DATA_KEY || 1948 if (btrfs_key_type(&key) > BTRFS_EXTENT_DATA_KEY ||
1949 key.objectid != src->i_ino) 1949 key.objectid != btrfs_ino(src))
1950 break; 1950 break;
1951 1951
1952 if (btrfs_key_type(&key) == BTRFS_EXTENT_DATA_KEY) { 1952 if (btrfs_key_type(&key) == BTRFS_EXTENT_DATA_KEY) {
@@ -1989,7 +1989,7 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd,
1989 goto next; 1989 goto next;
1990 1990
1991 memcpy(&new_key, &key, sizeof(new_key)); 1991 memcpy(&new_key, &key, sizeof(new_key));
1992 new_key.objectid = inode->i_ino; 1992 new_key.objectid = btrfs_ino(inode);
1993 if (off <= key.offset) 1993 if (off <= key.offset)
1994 new_key.offset = key.offset + destoff - off; 1994 new_key.offset = key.offset + destoff - off;
1995 else 1995 else
@@ -2043,7 +2043,7 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd,
2043 ret = btrfs_inc_extent_ref(trans, root, 2043 ret = btrfs_inc_extent_ref(trans, root,
2044 disko, diskl, 0, 2044 disko, diskl, 0,
2045 root->root_key.objectid, 2045 root->root_key.objectid,
2046 inode->i_ino, 2046 btrfs_ino(inode),
2047 new_key.offset - datao); 2047 new_key.offset - datao);
2048 BUG_ON(ret); 2048 BUG_ON(ret);
2049 } 2049 }