kill-the-BKL/reiserfs: release write lock while rescheduling on prepare_for_delete_or...
commit5e69e3a4492ea5abfd2e8ddc575448becf28e4d9
authorFrederic Weisbecker <fweisbec@gmail.com>
Thu, 30 Apr 2009 21:36:33 +0000 (30 23:36 +0200)
committerFrederic Weisbecker <fweisbec@gmail.com>
Mon, 14 Sep 2009 05:18:09 +0000 (14 07:18 +0200)
tree85cad0034222ceef31241e7c0e406bc76aca0186
parente6950a4da33fa84ef4402d29e2331cd5e5df9cb8
kill-the-BKL/reiserfs: release write lock while rescheduling on prepare_for_delete_or_cut()

prepare_for_delete_or_cut() can process several types of items, including
indirect items, ie: items which contain no file data but pointers to
unformatted nodes scattering the datas of a file.

In this case it has to zero out these pointers to block numbers of
unformatted nodes and release the bitmap from these block numbers.

It can take some time, so a rescheduling() is performed between each
block processed. We can safely release the write lock while
rescheduling(), like the bkl did, because the code checks just after
if the item has moved after sleeping.

[ Impact: release the reiserfs write lock when it is not needed ]

Cc: Jeff Mahoney <jeffm@suse.com>
Cc: Chris Mason <chris.mason@oracle.com>
Cc: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
fs/reiserfs/stree.c