diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-07-16 12:01:42 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-07-16 12:01:42 -0400 |
commit | 8626e4a42675ff9903f7d4fbf14d8ebc11b5926c (patch) | |
tree | c631dfe2854cb1382a5d8f5aa11b071762ddf27d /fs/btrfs/backref.c | |
parent | a8d8f02cf0c379693762107afe812b9e52090e39 (diff) | |
parent | 9249e17fe094d853d1ef7475dd559a2cc7e23d42 (diff) |
Merge commit '9249e17fe094d853d1ef7475dd559a2cc7e23d42' into nfs-for-3.6
Resolve conflicts with the VFS atomic open and sget changes.
Conflicts:
fs/nfs/nfs4proc.c
Diffstat (limited to 'fs/btrfs/backref.c')
-rw-r--r-- | fs/btrfs/backref.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index 7301cdb4b2cb..a383c18e74e8 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c | |||
@@ -301,10 +301,14 @@ static int __resolve_indirect_ref(struct btrfs_fs_info *fs_info, | |||
301 | goto out; | 301 | goto out; |
302 | 302 | ||
303 | eb = path->nodes[level]; | 303 | eb = path->nodes[level]; |
304 | if (!eb) { | 304 | while (!eb) { |
305 | WARN_ON(1); | 305 | if (!level) { |
306 | ret = 1; | 306 | WARN_ON(1); |
307 | goto out; | 307 | ret = 1; |
308 | goto out; | ||
309 | } | ||
310 | level--; | ||
311 | eb = path->nodes[level]; | ||
308 | } | 312 | } |
309 | 313 | ||
310 | ret = add_all_parents(root, path, parents, level, &ref->key_for_search, | 314 | ret = add_all_parents(root, path, parents, level, &ref->key_for_search, |
@@ -835,6 +839,7 @@ again: | |||
835 | } | 839 | } |
836 | ret = __add_delayed_refs(head, delayed_ref_seq, | 840 | ret = __add_delayed_refs(head, delayed_ref_seq, |
837 | &prefs_delayed); | 841 | &prefs_delayed); |
842 | mutex_unlock(&head->mutex); | ||
838 | if (ret) { | 843 | if (ret) { |
839 | spin_unlock(&delayed_refs->lock); | 844 | spin_unlock(&delayed_refs->lock); |
840 | goto out; | 845 | goto out; |
@@ -928,8 +933,6 @@ again: | |||
928 | } | 933 | } |
929 | 934 | ||
930 | out: | 935 | out: |
931 | if (head) | ||
932 | mutex_unlock(&head->mutex); | ||
933 | btrfs_free_path(path); | 936 | btrfs_free_path(path); |
934 | while (!list_empty(&prefs)) { | 937 | while (!list_empty(&prefs)) { |
935 | ref = list_first_entry(&prefs, struct __prelim_ref, list); | 938 | ref = list_first_entry(&prefs, struct __prelim_ref, list); |