diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2011-11-16 11:28:01 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2011-11-30 18:46:01 +0100 |
commit | 26bdef541d26fd6a5ddffdf8949ace22f94f809f (patch) | |
tree | 85e4db1a93d211a719cb2c1ecec384ff442e0cd9 /fs/btrfs | |
parent | 24a70313969fc3fc440216b40babdb42564acff3 (diff) | |
download | kernel-common-26bdef541d26fd6a5ddffdf8949ace22f94f809f.tar.gz kernel-common-26bdef541d26fd6a5ddffdf8949ace22f94f809f.tar.bz2 kernel-common-26bdef541d26fd6a5ddffdf8949ace22f94f809f.zip |
btrfs scrub: handle -ENOMEM from init_ipath()
init_ipath() can return an ERR_PTR(-ENOMEM).
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/scrub.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index fab420db5121..c27bcb67f330 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c @@ -256,6 +256,11 @@ static int scrub_print_warning_inode(u64 inum, u64 offset, u64 root, void *ctx) btrfs_release_path(swarn->path); ipath = init_ipath(4096, local_root, swarn->path); + if (IS_ERR(ipath)) { + ret = PTR_ERR(ipath); + ipath = NULL; + goto err; + } ret = paths_from_inode(inum, ipath); if (ret < 0) |