ceph: fix snap realm splits
authorSage Weil <sage@newdream.net>
Mon, 19 Apr 2010 17:15:44 +0000 (10:15 -0700)
committerSage Weil <sage@newdream.net>
Mon, 3 May 2010 17:49:23 +0000 (10:49 -0700)
commit91dee39eebcfb47085c4d457a584b0e9723b6ca0
tree52bdeb4795c3b60b1d23460cada8c813c94fb7a9
parentc10f5e12bafde7f7a2f9b75d76f7a68d62154e91
ceph: fix snap realm splits

The snap realm split was checking i_snap_realm, not the list_head, to
determine if an inode belonged in the new realm.  The check always failed,
which meant we always moved the inode, corrupting the old realm's list and
causing various crashes.

Also wait to release old realm reference to avoid possibility of use after
free.

Signed-off-by: Sage Weil <sage@newdream.net>
fs/ceph/snap.c