From 91be82702848e8789a428061dee366fa0e3790e7 Mon Sep 17 00:00:00 2001 From: Tao Ma Date: Fri, 26 Feb 2010 10:54:52 +0800 Subject: [PATCH] --- yaml --- r: 185462 b: refs/heads/master c: cbaee472f274ea9a98aabe47025f6e5551acadcb h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/ocfs2/aops.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 3e285a5d5ddf..e163acf13b35 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 66b116c9d8f70baadf5b2145dddb35af222df041 +refs/heads/master: cbaee472f274ea9a98aabe47025f6e5551acadcb diff --git a/trunk/fs/ocfs2/aops.c b/trunk/fs/ocfs2/aops.c index 7e9df11260f4..4c2a6d282c4d 100644 --- a/trunk/fs/ocfs2/aops.c +++ b/trunk/fs/ocfs2/aops.c @@ -577,8 +577,9 @@ static int ocfs2_direct_IO_get_blocks(struct inode *inode, sector_t iblock, goto bail; } - /* We should already CoW the refcounted extent. */ - BUG_ON(ext_flags & OCFS2_EXT_REFCOUNTED); + /* We should already CoW the refcounted extent in case of create. */ + BUG_ON(create && (ext_flags & OCFS2_EXT_REFCOUNTED)); + /* * get_more_blocks() expects us to describe a hole by clearing * the mapped bit on bh_result().