summaryrefslogtreecommitdiff
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-09-11 15:51:43 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:07 -0400
commit98509cfc5a6857bddcfe4b19a9539726655ec9bd (patch)
tree187cf35f0ebd6c7ce6f17a1d0e3c6b18d0afd85a /fs/btrfs/inode.c
parent8d5bf1cb35ea29795862ff0ea2f4c4d7e22727f3 (diff)
downloadlwn-98509cfc5a6857bddcfe4b19a9539726655ec9bd.tar.gz
lwn-98509cfc5a6857bddcfe4b19a9539726655ec9bd.zip
Btrfs: Fix releasepage to properly keep dirty and writeback pages
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 073fdd77c784..24b7e97fccb9 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -3060,6 +3060,8 @@ static int __btrfs_releasepage(struct page *page, gfp_t gfp_flags)
static int btrfs_releasepage(struct page *page, gfp_t gfp_flags)
{
+ if (PageWriteback(page) || PageDirty(page))
+ return 0;
return __btrfs_releasepage(page, gfp_flags);
}