lkml.org 
[lkml]   [2016]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] block-dev: checking for NULL instead of IS_ERR()
This should be an IS_ERR() check.  mount_pseudo() returns error pointers
and this function should return the error pointer to its caller as well.

Fixes: 3684aa7099e0 ('block-dev: enable writeback cgroup support')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/fs/block_dev.c b/fs/block_dev.c
index 3172c4e..2de969e 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -577,7 +577,7 @@ static struct dentry *bd_mount(struct file_system_type *fs_type,
{
struct dentry *dent;
dent = mount_pseudo(fs_type, "bdev:", &bdev_sops, NULL, BDEVFS_MAGIC);
- if (dent)
+ if (!IS_ERR(dent))
dent->d_sb->s_iflags |= SB_I_CGROUPWB;
return dent;
}
\
 
 \ /
  Last update: 2016-03-08 13:41    [W:0.049 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site