lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 26 Apr 2012 13:11:56 +1000
From:	Dave Chinner <david@...morbit.com>
To:	Miao Xie <miaoxie1984@...il.com>
Cc:	Alexander Viro <viro@...iv.linux.org.uk>,
	Christoph Hellwig <hch@...radead.org>,
	Linux FSDevel <linux-fsdevel@...r.kernel.org>,
	Linux Btrfs <linux-btrfs@...r.kernel.org>,
	miaox@...fujitsu.com, Kamal Mostafa <kamal@...onical.com>,
	Linux Ext4 <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH 1/4] vfs: introduce try_to_writeback_inodes_sb(_nr)

On Thu, Apr 26, 2012 at 10:57:43AM +0800, Miao Xie wrote:
> writeback_inodes_sb(_nr) grabs s_umount lock when it want to start writeback,
> it may bring us deadlock problem when doing umount. So we introduce new
> functions -- try_to_writeback_inodes_sb(_nr) -- which use down_read_trylock()
> instead of down_read() to avoid that deadlock problem.
> 
> This idea came from Christoph Hellwig.
> Some code is from the patch of Kamal Mostafa.

This just re-implements writeback_inodes_[nr]_sb_if_idle() with a
trylock instead of a blocking lock.

Just replace the blocking lock in writeback_inodes_[nr]_sb_if_idle()
with a trylock and use that.

Cheers,

Dave.
-- 
Dave Chinner
david@...morbit.com
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists