]> Pileus Git - ~andy/linux/commit
f2fs: fix wrong BUG_ON condition
authorJaegeuk Kim <jaegeuk.kim@samsung.com>
Tue, 20 Aug 2013 10:13:07 +0000 (19:13 +0900)
committerJaegeuk Kim <jaegeuk.kim@samsung.com>
Tue, 20 Aug 2013 10:32:48 +0000 (19:32 +0900)
commitd59ff4df7b7ae39e6fb047db9e83cd899b5764f1
tree53831b9f1791bc0b0cd64b35c2f10741b8abc213
parent9890ff3f23ed78c63611f661006cd5ae38550f44
f2fs: fix wrong BUG_ON condition

This patch removes a false-alaramed BUG_ON.
The previous BUG_ON condition didn't cover the following true scenario.

In f2fs_add_link, 1) get_new_data_page gives an uptodate page successfully,
and then, 2) init_inode_metadata returns -ENOSPC.
At this moment, a new clean data page is remained in the page cache, but its
block address still indicates NEW_ADDR.
After then, even if sync is called, this clean data page cannot be written to
the disk due to the clean state.

So this means that get_lock_data_page should make a new empty page when its
block address is NEW_ADDR and its page is not uptodated.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
fs/f2fs/data.c