diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-14 14:13:11 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-14 14:13:11 -0800 |
commit | f14fc0ccee5521e5b38cdd1df4385d32c6e1805b (patch) | |
tree | 0d16887967fee217cae343ffebc6666e3fd4265d /fs/quota/dquot.c | |
parent | 23281c8034879c47639ee0f76c34d13ef6beb8ce (diff) | |
parent | 838bee9e756ec46e9b5be25f9e44388d7e185a2a (diff) | |
download | linux-f14fc0ccee5521e5b38cdd1df4385d32c6e1805b.tar.gz linux-f14fc0ccee5521e5b38cdd1df4385d32c6e1805b.tar.bz2 linux-f14fc0ccee5521e5b38cdd1df4385d32c6e1805b.zip |
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull quota, ext2, isofs and udf fixes from Jan Kara:
- two small quota error handling fixes
- two isofs fixes for architectures with signed char
- several udf block number overflow and signedness fixes
- ext2 rework of mount option handling to avoid GFP_KERNEL allocation
with spinlock held
- ... it also contains a patch to implement auditing of responses to
fanotify permission events. That should have been in the fanotify
pull request but I mistakenly merged that patch into a wrong branch
and noticed only now at which point I don't think it's worth rebasing
and redoing.
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
quota: be aware of error from dquot_initialize
quota: fix potential infinite loop
isofs: use unsigned char types consistently
isofs: fix timestamps beyond 2027
udf: Fix some sign-conversion warnings
udf: Fix signed/unsigned format specifiers
udf: Fix 64-bit sign extension issues affecting blocks > 0x7FFFFFFF
udf: Remove some outdate references from documentation
udf: Avoid overflow when session starts at large offset
ext2: Fix possible sleep in atomic during mount option parsing
ext2: Parse mount options into a dedicated structure
audit: Record fanotify access control decisions
Diffstat (limited to 'fs/quota/dquot.c')
-rw-r--r-- | fs/quota/dquot.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index 9f78b5015f2e..39f1b0b0c76f 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c @@ -645,8 +645,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); } @@ -2139,7 +2146,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); |