* [patch 1/3] btrfs: checking for NULL instead of IS_ERR()
@ 2010-03-20 11:22 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2010-03-20 11:22 UTC (permalink / raw)
To: Chris Mason
Cc: Yan Zheng, Josef Bacik, Sage Weil, Al Viro, linux-btrfs,
linux-kernel, kernel-janitors
btrfs_get_extent() never returns NULL, only a valid pointer or ERR_PTR()
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 2845c6c..15f661d 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -511,7 +511,7 @@ static int should_defrag_range(struct inode *inode, u64 start, u64 len,
em = btrfs_get_extent(inode, NULL, 0, start, len, 0);
unlock_extent(io_tree, start, start + len - 1, GFP_NOFS);
- if (!em)
+ if (IS_ERR(em))
return 0;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [patch 1/3] btrfs: checking for NULL instead of IS_ERR()
@ 2010-03-20 11:22 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2010-03-20 11:22 UTC (permalink / raw)
To: Chris Mason
Cc: Yan Zheng, Josef Bacik, Sage Weil, Al Viro, linux-btrfs,
linux-kernel, kernel-janitors
btrfs_get_extent() never returns NULL, only a valid pointer or ERR_PTR()
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 2845c6c..15f661d 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -511,7 +511,7 @@ static int should_defrag_range(struct inode *inode, u64 start, u64 len,
em = btrfs_get_extent(inode, NULL, 0, start, len, 0);
unlock_extent(io_tree, start, start + len - 1, GFP_NOFS);
- if (!em)
+ if (IS_ERR(em))
return 0;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-03-20 11:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-20 11:22 [patch 1/3] btrfs: checking for NULL instead of IS_ERR() Dan Carpenter
2010-03-20 11:22 ` Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.