diff options
| author | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-05-19 15:09:05 +1000 |
|---|---|---|
| committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-05-19 15:09:05 +1000 |
| commit | c203e45f069af47ca7623e4dcd8c00bfba2722e4 (patch) | |
| tree | 4563115b6565dcfd97015c1c9366fb3d07cabf19 /fs/dquot.c | |
| parent | a94477da38e0b261a7ecea71f4c95a3bcd5be69c (diff) | |
| parent | b8291ad07a7f3b5b990900f0001198ac23ba893e (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus
Diffstat (limited to 'fs/dquot.c')
| -rw-r--r-- | fs/dquot.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/dquot.c b/fs/dquot.c index dfba1623ccc..5ac77da1995 100644 --- a/fs/dquot.c +++ b/fs/dquot.c @@ -1491,6 +1491,16 @@ int vfs_quota_off(struct super_block *sb, int type, int remount) /* We need to serialize quota_off() for device */ mutex_lock(&dqopt->dqonoff_mutex); + + /* + * Skip everything if there's nothing to do. We have to do this because + * sometimes we are called when fill_super() failed and calling + * sync_fs() in such cases does no good. + */ + if (!sb_any_quota_enabled(sb) && !sb_any_quota_suspended(sb)) { + mutex_unlock(&dqopt->dqonoff_mutex); + return 0; + } for (cnt = 0; cnt < MAXQUOTAS; cnt++) { toputinode[cnt] = NULL; if (type != -1 && cnt != type) |
