diff options
author | Josef Bacik <josef@redhat.com> | 2011-01-24 21:43:18 +0000 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-01-28 16:40:37 -0500 |
commit | dedefd7215d3ec451291ca393e5c8e4c1882c8c6 (patch) | |
tree | 45ab482f3fa6896fc63051c356399d45e5ea8140 /fs/btrfs | |
parent | abd30bb0af9d4671506502278e8631bed9e3c35c (diff) | |
download | linux-3.10-dedefd7215d3ec451291ca393e5c8e4c1882c8c6.tar.gz linux-3.10-dedefd7215d3ec451291ca393e5c8e4c1882c8c6.tar.bz2 linux-3.10-dedefd7215d3ec451291ca393e5c8e4c1882c8c6.zip |
Btrfs: fix check_path_shared so it returns the right value
When running xfstests 224 I kept getting ENOSPC when trying to remove the files,
and this is because we were returning ret from check_path_shared while it was
uninitalized, which isn't right. Fix this to return 0 properly, and now
xfstests 224 doesn't freak out when it tries to clean itself up. Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/inode.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 40fee137dd1..5621818921f 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -2718,9 +2718,10 @@ static int check_path_shared(struct btrfs_root *root, struct extent_buffer *eb; int level; u64 refs = 1; - int uninitialized_var(ret); for (level = 0; level < BTRFS_MAX_LEVEL; level++) { + int ret; + if (!path->nodes[level]) break; eb = path->nodes[level]; @@ -2731,7 +2732,7 @@ static int check_path_shared(struct btrfs_root *root, if (refs > 1) return 1; } - return ret; /* XXX callers? */ + return 0; } /* |