diff --git a/[refs] b/[refs] index e7d1aac1e2ee..7badc3c9afa5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a05a9bb18ae0abec0b513b5fde876c47905fa13e +refs/heads/master: 560f7d75457f86a43970aa413e334e394082dce4 diff --git a/trunk/fs/btrfs/inode.c b/trunk/fs/btrfs/inode.c index f12747c9447b..81d4f68f35c9 100644 --- a/trunk/fs/btrfs/inode.c +++ b/trunk/fs/btrfs/inode.c @@ -393,7 +393,10 @@ static noinline int compress_file_range(struct inode *inode, (BTRFS_I(inode)->flags & BTRFS_INODE_COMPRESS))) { WARN_ON(pages); pages = kzalloc(sizeof(struct page *) * nr_pages, GFP_NOFS); - BUG_ON(!pages); + if (!pages) { + /* just bail out to the uncompressed code */ + goto cont; + } if (BTRFS_I(inode)->force_compress) compress_type = BTRFS_I(inode)->force_compress; @@ -424,6 +427,7 @@ static noinline int compress_file_range(struct inode *inode, will_compress = 1; } } +cont: if (start == 0) { trans = btrfs_join_transaction(root); BUG_ON(IS_ERR(trans));