aboutsummaryrefslogtreecommitdiffstats
path: root/fs/quota/dquot.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/quota/dquot.c')
-rw-r--r--fs/quota/dquot.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index 4d2041fddefc..10d021dd37c1 100644
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -2033,11 +2033,13 @@ static int vfs_load_quota_inode(struct inode *inode, int type, int format_id,
2033 } 2033 }
2034 2034
2035 if (!(dqopt->flags & DQUOT_QUOTA_SYS_FILE)) { 2035 if (!(dqopt->flags & DQUOT_QUOTA_SYS_FILE)) {
2036 /* As we bypass the pagecache we must now flush the inode so 2036 /* As we bypass the pagecache we must now flush all the
2037 * that we see all the changes from userspace... */ 2037 * dirty data and invalidate caches so that kernel sees
2038 write_inode_now(inode, 1); 2038 * changes from userspace. It is not enough to just flush
2039 /* And now flush the block cache so that kernel sees the 2039 * the quota file since if blocksize < pagesize, invalidation
2040 * changes */ 2040 * of the cache could fail because of other unrelated dirty
2041 * data */
2042 sync_filesystem(sb);
2041 invalidate_bdev(sb->s_bdev); 2043 invalidate_bdev(sb->s_bdev);
2042 } 2044 }
2043 mutex_lock(&dqopt->dqonoff_mutex); 2045 mutex_lock(&dqopt->dqonoff_mutex);