Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[sfrench/cifs-2.6.git] / fs / quota / dquot.c
index 4639d53e96a32619e02f75b4a991f37b3355dc55..b0688c02dc90df44295a52a497948c31e3db7d57 100644 (file)
@@ -2487,21 +2487,15 @@ int dquot_quota_on_mount(struct super_block *sb, char *qf_name,
        struct dentry *dentry;
        int error;
 
-       dentry = lookup_one_len_unlocked(qf_name, sb->s_root, strlen(qf_name));
+       dentry = lookup_positive_unlocked(qf_name, sb->s_root, strlen(qf_name));
        if (IS_ERR(dentry))
                return PTR_ERR(dentry);
 
-       if (d_really_is_negative(dentry)) {
-               error = -ENOENT;
-               goto out;
-       }
-
        error = security_quota_on(dentry);
        if (!error)
                error = dquot_load_quota_inode(d_inode(dentry), type, format_id,
                                DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED);
 
-out:
        dput(dentry);
        return error;
 }