aboutsummaryrefslogtreecommitdiffstats
path: root/fs/quota
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2017-11-14 11:09:53 +0100
committerJan Kara <jack@suse.cz>2017-11-14 11:09:53 +0100
commit838bee9e756ec46e9b5be25f9e44388d7e185a2a (patch)
treeebabacacc94478173d2707ea3f931a79b7bae214 /fs/quota
parentquota: Generate warnings for DQUOT_SPACE_NOFAIL allocations (diff)
parentquota: be aware of error from dquot_initialize (diff)
downloadlinux-dev-838bee9e756ec46e9b5be25f9e44388d7e185a2a.tar.xz
linux-dev-838bee9e756ec46e9b5be25f9e44388d7e185a2a.zip
Merge udf, isofs, quota, ext2 changes for 4.15-rc1.
Diffstat (limited to 'fs/quota')
-rw-r--r--fs/quota/dquot.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index 52ad15192e72..5db18c0582c8 100644
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -644,8 +644,15 @@ int dquot_writeback_dquots(struct super_block *sb, int type)
spin_unlock(&dq_list_lock);
dqstats_inc(DQST_LOOKUPS);
err = sb->dq_op->write_dquot(dquot);
- if (!ret && err)
- ret = err;
+ if (err) {
+ /*
+ * Clear dirty bit anyway to avoid infinite
+ * loop here.
+ */
+ clear_dquot_dirty(dquot);
+ if (!ret)
+ ret = err;
+ }
dqput(dquot);
spin_lock(&dq_list_lock);
}
@@ -2138,7 +2145,7 @@ int dquot_file_open(struct inode *inode, struct file *file)
error = generic_file_open(inode, file);
if (!error && (file->f_mode & FMODE_WRITE))
- dquot_initialize(inode);
+ error = dquot_initialize(inode);
return error;
}
EXPORT_SYMBOL(dquot_file_open);