Unionfs: properly check for error in ->mount
authorErez Zadok <ezk@cs.sunysb.edu>
Fri, 3 Feb 2012 03:51:18 +0000 (22:51 -0500)
committerErez Zadok <ezk@cs.sunysb.edu>
Fri, 3 Feb 2012 03:51:18 +0000 (22:51 -0500)
Record dev_name correctly for branch-management.

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

index f4bcd89498612644651d46f9966657dcee14dfda..99aab4cdb058e5da33a5af6f7362875d6e2499b1 100644 (file)
@@ -700,7 +700,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;