]> git.karo-electronics.de Git - karo-tx-linux.git/commit
xfs: fix buffer flushing during unmount
authorChristoph Hellwig <hch@infradead.org>
Wed, 14 Sep 2011 14:08:26 +0000 (14:08 +0000)
committerAlex Elder <aelder@sgi.com>
Wed, 5 Oct 2011 04:12:34 +0000 (23:12 -0500)
commitab03e6ad834d81f95f24f66231bfab6b9a8ef82c
tree8b5ecfb8d07a172fb936c0fefa1c417731486095
parent6f76e76852b85216d518d6163ff1e84bd73a624d
xfs: fix buffer flushing during unmount

The code to flush buffers in the umount code is a bit iffy: we first
flush all delwri buffers out, but then might be able to queue up a
new one when logging the sb counts.  On a normal shutdown that one
would get flushed out when doing the synchronous superblock write in
xfs_unmountfs_writesb, but we skip that one if the filesystem has
been shut down.

Fix this by moving the delwri list flushing until just before unmounting
the log, and while we're at it also remove the superflous delwri list
and buffer lru flusing for the rt and log device that can never have
cached or delwri buffers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Amit Sahrawat <amit.sahrawat83@gmail.com>
Tested-by: Amit Sahrawat <amit.sahrawat83@gmail.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
fs/xfs/xfs_buf.h
fs/xfs/xfs_mount.c