projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
block: remove i_bdev
[linux-2.6-microblaze.git]
/
fs
/
quota
/
quota.c
diff --git
a/fs/quota/quota.c
b/fs/quota/quota.c
index
f3d32b0
..
6d16b2b
100644
(file)
--- a/
fs/quota/quota.c
+++ b/
fs/quota/quota.c
@@
-866,17
+866,18
@@
static bool quotactl_cmd_onoff(int cmd)
static struct super_block *quotactl_block(const char __user *special, int cmd)
{
#ifdef CONFIG_BLOCK
static struct super_block *quotactl_block(const char __user *special, int cmd)
{
#ifdef CONFIG_BLOCK
- struct block_device *bdev;
struct super_block *sb;
struct filename *tmp = getname(special);
bool excl = false, thawed = false;
struct super_block *sb;
struct filename *tmp = getname(special);
bool excl = false, thawed = false;
+ int error;
+ dev_t dev;
if (IS_ERR(tmp))
return ERR_CAST(tmp);
if (IS_ERR(tmp))
return ERR_CAST(tmp);
-
bdev = lookup_bdev(tmp->name
);
+
error = lookup_bdev(tmp->name, &dev
);
putname(tmp);
putname(tmp);
- if (
IS_ERR(bdev)
)
- return ERR_
CAST(bdev
);
+ if (
error
)
+ return ERR_
PTR(error
);
if (quotactl_cmd_onoff(cmd)) {
excl = true;
if (quotactl_cmd_onoff(cmd)) {
excl = true;
@@
-886,8
+887,10
@@
static struct super_block *quotactl_block(const char __user *special, int cmd)
}
retry:
}
retry:
- sb = __get_super(bdev, excl);
- if (thawed && sb && sb->s_writers.frozen != SB_UNFROZEN) {
+ sb = user_get_super(dev, excl);
+ if (!sb)
+ return ERR_PTR(-ENODEV);
+ if (thawed && sb->s_writers.frozen != SB_UNFROZEN) {
if (excl)
up_write(&sb->s_umount);
else
if (excl)
up_write(&sb->s_umount);
else
@@
-897,10
+900,6
@@
retry:
put_super(sb);
goto retry;
}
put_super(sb);
goto retry;
}
-
- bdput(bdev);
- if (!sb)
- return ERR_PTR(-ENODEV);
return sb;
#else
return sb;
#else