diff options
author | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-12-22 17:34:26 +1100 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-12-22 17:34:26 +1100 |
commit | 27a0464a6cb837d3a90b6e69365dfc01cb0dff2f (patch) | |
tree | 361f00f4d4ad4c01b6144c52004bee2b948742ad /lib/idr.c | |
parent | 4d9d4ebf5de848e3450e23e4db9ac74e23e5daa6 (diff) | |
parent | 3d44cc3e01ee1b40317f79ed54324e25c4f848df (diff) |
[XFS] Fix merge conflict in fs/xfs/xfs_rename.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
fs/xfs/xfs_rename.c
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'lib/idr.c')
-rw-r--r-- | lib/idr.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/idr.c b/lib/idr.c index 7a785a0c2ea..1c4f9281f41 100644 --- a/lib/idr.c +++ b/lib/idr.c @@ -220,8 +220,14 @@ build_up: */ while ((layers < (MAX_LEVEL - 1)) && (id >= (1 << (layers*IDR_BITS)))) { layers++; - if (!p->count) + if (!p->count) { + /* special case: if the tree is currently empty, + * then we grow the tree by moving the top node + * upwards. + */ + p->layer++; continue; + } if (!(new = get_from_free_list(idp))) { /* * The allocation failed. If we built part of |