diff options
| author | Anton Altaparmakov <aia21@cantab.net> | 2006-01-19 11:39:33 -0500 | 
|---|---|---|
| committer | Anton Altaparmakov <aia21@cantab.net> | 2006-01-19 11:39:33 -0500 | 
| commit | 944d79559d154c12becde0dab327016cf438f46c (patch) | |
| tree | 50c101806f4d3b6585222dda060559eb4f3e005a /fs/quota.c | |
| parent | d087e4bdd24ebe3ae3d0b265b6573ec901af4b4b (diff) | |
| parent | 0f36b018b2e314d45af86449f1a97facb1fbe300 (diff) | |
Merge branch 'master' of /usr/src/ntfs-2.6/
Diffstat (limited to 'fs/quota.c')
| -rw-r--r-- | fs/quota.c | 7 | 
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/quota.c b/fs/quota.c index 612e04db4b93..ba9e0bf32f67 100644 --- a/fs/quota.c +++ b/fs/quota.c  | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #include <linux/security.h> | 15 | #include <linux/security.h> | 
| 16 | #include <linux/syscalls.h> | 16 | #include <linux/syscalls.h> | 
| 17 | #include <linux/buffer_head.h> | 17 | #include <linux/buffer_head.h> | 
| 18 | #include <linux/capability.h> | ||
| 18 | #include <linux/quotaops.h> | 19 | #include <linux/quotaops.h> | 
| 19 | 20 | ||
| 20 | /* Check validity of generic quotactl commands */ | 21 | /* Check validity of generic quotactl commands */ | 
| @@ -168,7 +169,7 @@ static void quota_sync_sb(struct super_block *sb, int type) | |||
| 168 | sync_blockdev(sb->s_bdev); | 169 | sync_blockdev(sb->s_bdev); | 
| 169 | 170 | ||
| 170 | /* Now when everything is written we can discard the pagecache so | 171 | /* Now when everything is written we can discard the pagecache so | 
| 171 | * that userspace sees the changes. We need i_sem and so we could | 172 | * that userspace sees the changes. We need i_mutex and so we could | 
| 172 | * not do it inside dqonoff_sem. Moreover we need to be carefull | 173 | * not do it inside dqonoff_sem. Moreover we need to be carefull | 
| 173 | * about races with quotaoff() (that is the reason why we have own | 174 | * about races with quotaoff() (that is the reason why we have own | 
| 174 | * reference to inode). */ | 175 | * reference to inode). */ | 
| @@ -184,9 +185,9 @@ static void quota_sync_sb(struct super_block *sb, int type) | |||
| 184 | up(&sb_dqopt(sb)->dqonoff_sem); | 185 | up(&sb_dqopt(sb)->dqonoff_sem); | 
| 185 | for (cnt = 0; cnt < MAXQUOTAS; cnt++) { | 186 | for (cnt = 0; cnt < MAXQUOTAS; cnt++) { | 
| 186 | if (discard[cnt]) { | 187 | if (discard[cnt]) { | 
| 187 | down(&discard[cnt]->i_sem); | 188 | mutex_lock(&discard[cnt]->i_mutex); | 
| 188 | truncate_inode_pages(&discard[cnt]->i_data, 0); | 189 | truncate_inode_pages(&discard[cnt]->i_data, 0); | 
| 189 | up(&discard[cnt]->i_sem); | 190 | mutex_unlock(&discard[cnt]->i_mutex); | 
| 190 | iput(discard[cnt]); | 191 | iput(discard[cnt]); | 
| 191 | } | 192 | } | 
| 192 | } | 193 | } | 
