Re: [PATCH] f2fs: mutex can't be used by down_write_nest_lock()

2016-03-02 Thread Jaegeuk Kim
g.com; > > t...@linutronix.de; > > rost...@goodmis.org; bige...@linutronix.de > > Cc: linux-kernel@vger.kernel.org; linux-f2fs-de...@lists.sourceforge.net; > > linux-fsde...@vger.kernel.org; linux-rt-us...@vger.kernel.org; > > linaro-ker...@lists.linaro.org; yang....@

RE: [PATCH] f2fs: mutex can't be used by down_write_nest_lock()

2016-03-01 Thread Chao Yu
> Cc: linux-kernel@vger.kernel.org; linux-f2fs-de...@lists.sourceforge.net; > linux-fsde...@vger.kernel.org; linux-rt-us...@vger.kernel.org; > linaro-ker...@lists.linaro.org; yang....@linaro.org > Subject: [PATCH] f2fs: mutex can't be used by down_write_nest_lock() > > fsf2_lock_all()

[PATCH] f2fs: mutex can't be used by down_write_nest_lock()

2016-02-26 Thread Yang Shi
fsf2_lock_all() calls down_write_nest_lock() to acquire a rw_sem and check a mutex, but down_write_nest_lock() is designed for two rw_sem accoring to the comment in include/linux/rwsem.h. And, other than f2fs, it is just called in mm/mmap.c with two rwsem. So, it looks it is used wrongly by f2fs.