git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
This commit was manufactured by cvs2svn to create tag
[linux-2.6.git]
/
fs
/
dquot.c
diff --git
a/fs/dquot.c
b/fs/dquot.c
index
70280bc
..
df42800
100644
(file)
--- a/
fs/dquot.c
+++ b/
fs/dquot.c
@@
-306,7
+306,7
@@
EXPORT_SYMBOL(mark_info_dirty);
int dquot_acquire(struct dquot *dquot)
{
int dquot_acquire(struct dquot *dquot)
{
- int ret = 0
, ret2 = 0
;
+ int ret = 0;
struct quota_info *dqopt = sb_dqopt(dquot->dq_sb);
down(&dquot->dq_lock);
struct quota_info *dqopt = sb_dqopt(dquot->dq_sb);
down(&dquot->dq_lock);
@@
-319,15
+319,8
@@
int dquot_acquire(struct dquot *dquot)
/* Instantiate dquot if needed */
if (!test_bit(DQ_ACTIVE_B, &dquot->dq_flags) && !dquot->dq_off) {
ret = dqopt->ops[dquot->dq_type]->commit_dqblk(dquot);
/* Instantiate dquot if needed */
if (!test_bit(DQ_ACTIVE_B, &dquot->dq_flags) && !dquot->dq_off) {
ret = dqopt->ops[dquot->dq_type]->commit_dqblk(dquot);
- /* Write the info if needed */
- if (info_dirty(&dqopt->info[dquot->dq_type]))
- ret2 = dqopt->ops[dquot->dq_type]->write_file_info(dquot->dq_sb, dquot->dq_type);
if (ret < 0)
goto out_iolock;
if (ret < 0)
goto out_iolock;
- if (ret2 < 0) {
- ret = ret2;
- goto out_iolock;
- }
}
set_bit(DQ_ACTIVE_B, &dquot->dq_flags);
out_iolock:
}
set_bit(DQ_ACTIVE_B, &dquot->dq_flags);
out_iolock:
@@
-341,7
+334,7
@@
out_iolock:
*/
int dquot_commit(struct dquot *dquot)
{
*/
int dquot_commit(struct dquot *dquot)
{
- int ret = 0
, ret2 = 0
;
+ int ret = 0;
struct quota_info *dqopt = sb_dqopt(dquot->dq_sb);
down(&dqopt->dqio_sem);
struct quota_info *dqopt = sb_dqopt(dquot->dq_sb);
down(&dqopt->dqio_sem);
@@
-353,15
+346,12
@@
int dquot_commit(struct dquot *dquot)
spin_unlock(&dq_list_lock);
/* Inactive dquot can be only if there was error during read/init
* => we have better not writing it */
spin_unlock(&dq_list_lock);
/* Inactive dquot can be only if there was error during read/init
* => we have better not writing it */
- if (test_bit(DQ_ACTIVE_B, &dquot->dq_flags))
{
+ if (test_bit(DQ_ACTIVE_B, &dquot->dq_flags))
ret = dqopt->ops[dquot->dq_type]->commit_dqblk(dquot);
ret = dqopt->ops[dquot->dq_type]->commit_dqblk(dquot);
- if (info_dirty(&dqopt->info[dquot->dq_type]))
- ret2 = dqopt->ops[dquot->dq_type]->write_file_info(dquot->dq_sb, dquot->dq_type);
- if (ret >= 0)
- ret = ret2;
- }
out_sem:
up(&dqopt->dqio_sem);
out_sem:
up(&dqopt->dqio_sem);
+ if (info_dirty(&dqopt->info[dquot->dq_type]))
+ dquot->dq_sb->dq_op->write_info(dquot->dq_sb, dquot->dq_type);
return ret;
}
return ret;
}
@@
-370,7
+360,7
@@
out_sem:
*/
int dquot_release(struct dquot *dquot)
{
*/
int dquot_release(struct dquot *dquot)
{
- int ret = 0
, ret2 = 0
;
+ int ret = 0;
struct quota_info *dqopt = sb_dqopt(dquot->dq_sb);
down(&dquot->dq_lock);
struct quota_info *dqopt = sb_dqopt(dquot->dq_sb);
down(&dquot->dq_lock);
@@
-378,14
+368,8
@@
int dquot_release(struct dquot *dquot)
if (atomic_read(&dquot->dq_count) > 1)
goto out_dqlock;
down(&dqopt->dqio_sem);
if (atomic_read(&dquot->dq_count) > 1)
goto out_dqlock;
down(&dqopt->dqio_sem);
- if (dqopt->ops[dquot->dq_type]->release_dqblk)
{
+ if (dqopt->ops[dquot->dq_type]->release_dqblk)
ret = dqopt->ops[dquot->dq_type]->release_dqblk(dquot);
ret = dqopt->ops[dquot->dq_type]->release_dqblk(dquot);
- /* Write the info */
- if (info_dirty(&dqopt->info[dquot->dq_type]))
- ret2 = dqopt->ops[dquot->dq_type]->write_file_info(dquot->dq_sb, dquot->dq_type);
- if (ret >= 0)
- ret = ret2;
- }
clear_bit(DQ_ACTIVE_B, &dquot->dq_flags);
up(&dqopt->dqio_sem);
out_dqlock:
clear_bit(DQ_ACTIVE_B, &dquot->dq_flags);
up(&dqopt->dqio_sem);
out_dqlock: