aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dquot.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2005-11-28 16:44:14 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-28 17:42:26 -0500
commit154f484b92e5c25c400f6903512c511644a49322 (patch)
tree49b2e6a4fd1cbe51f0780aa568cfa7c14bbdc1e4 /fs/dquot.c
parent6aea114a728db9296f42102d4885e7fb035de0a9 (diff)
[PATCH] Fix oops in vfs_quotaon_mount()
When quota file specified in mount options did not exist, we tried to dereference NULL pointer later. Fix it. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/dquot.c')
-rw-r--r--fs/dquot.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/dquot.c b/fs/dquot.c
index 05b60283c9c2..2a62b3dc20ec 100644
--- a/fs/dquot.c
+++ b/fs/dquot.c
@@ -1513,10 +1513,16 @@ int vfs_quota_on_mount(struct super_block *sb, char *qf_name,
1513 if (IS_ERR(dentry)) 1513 if (IS_ERR(dentry))
1514 return PTR_ERR(dentry); 1514 return PTR_ERR(dentry);
1515 1515
1516 if (!dentry->d_inode) {
1517 error = -ENOENT;
1518 goto out;
1519 }
1520
1516 error = security_quota_on(dentry); 1521 error = security_quota_on(dentry);
1517 if (!error) 1522 if (!error)
1518 error = vfs_quota_on_inode(dentry->d_inode, type, format_id); 1523 error = vfs_quota_on_inode(dentry->d_inode, type, format_id);
1519 1524
1525out:
1520 dput(dentry); 1526 dput(dentry);
1521 return error; 1527 return error;
1522} 1528}