summaryrefslogtreecommitdiffstats
path: root/fs/dquot.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/dquot.c')
-rw-r--r--fs/dquot.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/dquot.c b/fs/dquot.c
index 64416f9ee..b72ac05ff 100644
--- a/fs/dquot.c
+++ b/fs/dquot.c
@@ -1544,15 +1544,15 @@ asmlinkage long sys_quotactl(int cmd, const char *special, int id, caddr_t addr)
dev = NODEV;
if (special != NULL || (cmds != Q_SYNC && cmds != Q_GETSTATS)) {
mode_t mode;
- struct dentry * dentry;
+ struct nameidata nd;
- dentry = namei(special);
- if (IS_ERR(dentry))
+ ret = user_path_walk(special, &nd);
+ if (ret)
goto out;
- dev = dentry->d_inode->i_rdev;
- mode = dentry->d_inode->i_mode;
- dput(dentry);
+ dev = nd.dentry->d_inode->i_rdev;
+ mode = nd.dentry->d_inode->i_mode;
+ path_release(&nd);
ret = -ENOTBLK;
if (!S_ISBLK(mode))