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
| ||
|
Date: Mon, 18 Mar 2013 14:44:42 +0900 From: Jaegeuk Kim <jaegeuk.kim@...sung.com> To: unlisted-recipients:; (no To-header on input) Cc: Jaegeuk Kim <jaegeuk.kim@...sung.com>, linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org, linux-f2fs-devel@...ts.sourceforge.net Subject: [PATCH] f2fs: fix to unlock node page when it was truncated If the node page was truncated, its block address became zero. This means that we don't need to write the node page, but have to unlock NODE_WRITE, decrease the number of dirty node pages, and then unlock_page before returning the f2fs_write_node_page with zero. Signed-off-by: Jaegeuk Kim <jaegeuk.kim@...sung.com> --- fs/f2fs/node.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index e275218..3dc63f4 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1106,15 +1106,15 @@ static int f2fs_write_node_page(struct page *page, /* This page is already truncated */ if (ni.blk_addr == NULL_ADDR) - return 0; + goto out; set_page_writeback(page); /* insert node offset */ write_node_page(sbi, page, nid, ni.blk_addr, &new_addr); set_node_addr(sbi, &ni, new_addr); +out: dec_page_count(sbi, F2FS_DIRTY_NODES); - mutex_unlock_op(sbi, NODE_WRITE); unlock_page(page); return 0; -- 1.8.1.3.566.gaa39828 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists