btrfs: Use PTR_ERR_OR_ZERO
authorSachin Kamat <sachin.kamat@linaro.org>
Mon, 17 Feb 2014 03:43:57 +0000 (09:13 +0530)
committerJosef Bacik <jbacik@fb.com>
Mon, 10 Mar 2014 19:16:51 +0000 (15:16 -0400)
PTR_RET is deprecated. Use PTR_ERR_OR_ZERO instead. While at it
also include missing err.h header.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Josef Bacik <jbacik@fb.com>
fs/btrfs/root-tree.c

index 1389b69..38bb47e 100644 (file)
@@ -16,6 +16,7 @@
  * Boston, MA 021110-1307, USA.
  */
 
+#include <linux/err.h>
 #include <linux/uuid.h>
 #include "ctree.h"
 #include "transaction.h"
@@ -271,7 +272,7 @@ int btrfs_find_orphan_roots(struct btrfs_root *tree_root)
                key.offset++;
 
                root = btrfs_read_fs_root(tree_root, &root_key);
-               err = PTR_RET(root);
+               err = PTR_ERR_OR_ZERO(root);
                if (err && err != -ENOENT) {
                        break;
                } else if (err == -ENOENT) {