Unionfs: properly check for error in ->mount
authorErez Zadok <ezk@cs.sunysb.edu>
Fri, 3 Feb 2012 03:49:59 +0000 (22:49 -0500)
committerErez Zadok <ezk@cs.sunysb.edu>
Tue, 11 Nov 2014 02:39:51 +0000 (21:39 -0500)
Record dev_name correctly for branch-management.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/main.c

index 87cd1fcdfe1193da0235b770bdc948f25d468df5..ee78f1d90c9601996b56735aeb3242d7c9940e34 100644 (file)
@@ -689,7 +689,7 @@ static struct dentry *unionfs_mount(struct file_system_type *fs_type,
        struct dentry *dentry;
 
        dentry = mount_nodev(fs_type, flags, raw_data, unionfs_read_super);
-       if (!PTR_ERR(dentry))
+       if (!IS_ERR(dentry))
                UNIONFS_SB(dentry->d_sb)->dev_name =
                        kstrdup(dev_name, GFP_KERNEL);
        return dentry;