From: Yingping Lu Date: Wed, 11 Jan 2006 10:02:29 +0000 (+1100) Subject: [XFS] xfssyncd is responsible for flushing inode or device's data by X-Git-Tag: v2.6.16-rc1~185^2~6 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71df099dc3f9cd17e8564eb647d7c1fb2ee83e2d;p=linux-2.6 [XFS] xfssyncd is responsible for flushing inode or device's data by extracting the work from its queue. In addition, this processing also decrement the inode's i_count. If there are any remaining works in queue before this process terminates, we have unbalanced increment and decrement of i_count. Thus it can cause assertion failure of vn_count. The fix allows xyssyncd to process any remaining work before it is shutdown. SGI-PV: 945935 SGI-Modid: xfs-linux-melb:xfs-kern:203970a Signed-off-by: Yingping Lu Signed-off-by: Nathan Scott --- diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index 556c1437b1..f22e426d9e 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c @@ -579,7 +579,7 @@ xfssyncd( timeleft = schedule_timeout_interruptible(timeleft); /* swsusp */ try_to_freeze(); - if (kthread_should_stop()) + if (kthread_should_stop() && list_empty(&vfsp->vfs_sync_list)) break; spin_lock(&vfsp->vfs_sync_lock);