From: Fabian Frederick <fabf@skynet.be>
To: linux-kernel@vger.kernel.org
Cc: Fabian Frederick <fabf@skynet.be>, Chris Mason <clm@fb.com>,
Josef Bacik <jbacik@fb.com>, David Sterba <dsterba@suse.cz>,
linux-btrfs@vger.kernel.org
Subject: [PATCH V2 linux-next] Btrfs: use BTRFS_COMPRESS_NONE instead of 0
Date: Fri, 3 Apr 2015 21:50:34 +0200 [thread overview]
Message-ID: <1428090634-21126-1-git-send-email-fabf@skynet.be> (raw)
cow_file_range_inline() was called with 0 instead of actual definition.
btrfs_finish_ordered_io() initialized compress_type with 0 as well.
(Thanks to David Sterba for suggesting this update).
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
V2: also replace 0 in btrfs_finish_ordered_io()
fs/btrfs/inode.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 5b6fbae..2f064d7 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -524,7 +524,8 @@ cont:
* to make an uncompressed inline extent.
*/
ret = cow_file_range_inline(root, inode, start, end,
- 0, 0, NULL);
+ 0, BTRFS_COMPRESS_NONE,
+ NULL);
} else {
/* try making a compressed inline extent */
ret = cow_file_range_inline(root, inode, start, end,
@@ -943,8 +944,8 @@ static noinline int cow_file_range(struct inode *inode,
if (start == 0) {
/* lets try to make an inline extent */
- ret = cow_file_range_inline(root, inode, start, end, 0, 0,
- NULL);
+ ret = cow_file_range_inline(root, inode, start, end, 0,
+ BTRFS_COMPRESS_NONE, NULL);
if (ret == 0) {
extent_clear_unlock_delalloc(inode, start, end, NULL,
EXTENT_LOCKED | EXTENT_DELALLOC |
@@ -2793,7 +2794,7 @@ static int btrfs_finish_ordered_io(struct btrfs_ordered_extent *ordered_extent)
struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree;
struct extent_state *cached_state = NULL;
struct new_sa_defrag_extent *new = NULL;
- int compress_type = 0;
+ int compress_type = BTRFS_COMPRESS_NONE;
int ret = 0;
u64 logical_len = ordered_extent->len;
bool nolock;
--
1.9.1
next reply other threads:[~2015-04-03 19:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-03 19:50 Fabian Frederick [this message]
2015-04-07 14:20 ` [PATCH V2 linux-next] Btrfs: use BTRFS_COMPRESS_NONE instead of 0 David Sterba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1428090634-21126-1-git-send-email-fabf@skynet.be \
--to=fabf@skynet.be \
--cc=clm@fb.com \
--cc=dsterba@suse.cz \
--cc=jbacik@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).