From: Jaegeuk Kim Date: Tue, 25 Nov 2014 18:59:45 +0000 (-0800) Subject: f2fs: fix deadlock during inline_data conversion X-Git-Tag: omap-for-v3.20/drop-legacy-3517~143^2~22 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f72739583a29bfaa57448ec2c9b122995d0ae4f;p=pandora-kernel.git f2fs: fix deadlock during inline_data conversion A deadlock can be occurred: Thread 1] Thread 2] - f2fs_write_data_pages - f2fs_write_begin - lock_page(page #0) - grab_cache_page(page #X) - get_node_page(inode_page) - grab_cache_page(page #0) : to convert inline_data - f2fs_write_data_page - f2fs_write_inline_data - get_node_page(inode_page) In this case, trying to lock inode_page and page #0 causes deadlock. In order to avoid this, this patch adds a rule for this locking policy, which is that page #0 should be locked followed by inode_page lock. Signed-off-by: Jaegeuk Kim --- Reading git-diff-tree failed