From: Qu Fuping Date: Fri, 15 Jul 2005 15:36:08 +0000 (-0500) Subject: JFS: fsync wrong behavior when I/O failure occurs X-Git-Tag: v2.6.13-rc4~25^2~4^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d9b1cdd2455017c6aa25bc2442092b81438981f;p=pandora-kernel.git JFS: fsync wrong behavior when I/O failure occurs This is half of a patch that Qu Fuping submitted in April. The first part was applied to fs/mpage.c in 2.6.12-rc4. jfs_fsync should return error, but it doesn't wait for the metadata page to be uptodate, e.g.: jfs_fsync->jfs_commit_inode->txCommit->diWrite->read_metapage-> __get_metapage->read_cache_page reads a page from disk. Because read is async, when read_cache_page: err = filler(data, page), filler will not return error, it just submits I/O request and returns. So, page is not uptodate. Checking only if(IS_ERROR(mp->page)) is not enough, we should add "|| !PageUptodate(mp->page)" Signed-off-by: Dave Kleikamp --- Reading git-diff-tree failed