summaryrefslogtreecommitdiff
path: root/fs/btrfs/ioctl.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2011-05-31 17:08:14 (GMT)
committerChris Mason <chris.mason@oracle.com>2011-06-04 12:03:46 (GMT)
commita4689d2bd3b00dcf5c4320f06e0ab88810fbff9c (patch)
tree295bcdb0fdbe5a4cda80eb886694efd45e276699 /fs/btrfs/ioctl.c
parentd132a538d258f8f52fd0cd8b5017755f4e915386 (diff)
downloadlinux-a4689d2bd3b00dcf5c4320f06e0ab88810fbff9c.tar.xz
btrfs: use btrfs_ino to access inode number
commit 4cb5300bc ("Btrfs: add mount -o auto_defrag") accesses inode number directly while it should use the helper with the new inode number allocator. Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r--fs/btrfs/ioctl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 74c8059..ac37040 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -706,16 +706,17 @@ static int find_new_extents(struct btrfs_root *root,
struct btrfs_file_extent_item *extent;
int type;
int ret;
+ u64 ino = btrfs_ino(inode);
path = btrfs_alloc_path();
if (!path)
return -ENOMEM;
- min_key.objectid = inode->i_ino;
+ min_key.objectid = ino;
min_key.type = BTRFS_EXTENT_DATA_KEY;
min_key.offset = *off;
- max_key.objectid = inode->i_ino;
+ max_key.objectid = ino;
max_key.type = (u8)-1;
max_key.offset = (u64)-1;
@@ -726,7 +727,7 @@ static int find_new_extents(struct btrfs_root *root,
path, 0, newer_than);
if (ret != 0)
goto none;
- if (min_key.objectid != inode->i_ino)
+ if (min_key.objectid != ino)
goto none;
if (min_key.type != BTRFS_EXTENT_DATA_KEY)
goto none;