diff options
author | Dan Carpenter <error27@gmail.com> | 2010-05-29 05:47:24 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2010-06-11 15:57:37 -0400 |
commit | cf1e99a4e0daa4a5623cd71108509823b9ff2d30 (patch) | |
tree | e2e613940e9d4449be976a5a09e1c2a72bb45a83 /fs/btrfs | |
parent | 3140c9a34b44cd4013baae8704fdb34a93a44475 (diff) |
Btrfs: btrfs_lookup_dir_item() can return ERR_PTR
btrfs_lookup_dir_item() can return either ERR_PTRs or null.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 9f9a1d9607a7..4dbaf89b1337 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -1845,7 +1845,7 @@ static long btrfs_ioctl_default_subvol(struct file *file, void __user *argp) | |||
1845 | dir_id = btrfs_super_root_dir(&root->fs_info->super_copy); | 1845 | dir_id = btrfs_super_root_dir(&root->fs_info->super_copy); |
1846 | di = btrfs_lookup_dir_item(trans, root->fs_info->tree_root, path, | 1846 | di = btrfs_lookup_dir_item(trans, root->fs_info->tree_root, path, |
1847 | dir_id, "default", 7, 1); | 1847 | dir_id, "default", 7, 1); |
1848 | if (!di) { | 1848 | if (IS_ERR_OR_NULL(di)) { |
1849 | btrfs_free_path(path); | 1849 | btrfs_free_path(path); |
1850 | btrfs_end_transaction(trans, root); | 1850 | btrfs_end_transaction(trans, root); |
1851 | printk(KERN_ERR "Umm, you don't have the default dir item, " | 1851 | printk(KERN_ERR "Umm, you don't have the default dir item, " |