Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 94119
b: refs/heads/master
c: 1b445a9
h: refs/heads/master
i:
  94117: a4374a3
  94115: 38ba572
  94111: bac4e81
v: v3
  • Loading branch information
Jan Kara authored and Linus Torvalds committed Apr 28, 2008
1 parent 3b918d4 commit 6702577
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6f28e08794749f3431e89302728e612343d9d9e4
refs/heads/master: 1b445a9c21f593be9d3c4ab912359d2c51c371dd
13 changes: 8 additions & 5 deletions trunk/fs/reiserfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ static int finish_unfinished(struct super_block *s)
/* Turn quotas off */
for (i = 0; i < MAXQUOTAS; i++) {
if (sb_dqopt(s)->files[i])
vfs_quota_off(s, i);
vfs_quota_off(s, i, 0);
}
if (ms_active_set)
/* Restore the flag back */
Expand Down Expand Up @@ -634,7 +634,7 @@ static int reiserfs_acquire_dquot(struct dquot *);
static int reiserfs_release_dquot(struct dquot *);
static int reiserfs_mark_dquot_dirty(struct dquot *);
static int reiserfs_write_info(struct super_block *, int);
static int reiserfs_quota_on(struct super_block *, int, int, char *);
static int reiserfs_quota_on(struct super_block *, int, int, char *, int);

static struct dquot_operations reiserfs_quota_operations = {
.initialize = reiserfs_dquot_initialize,
Expand Down Expand Up @@ -2015,13 +2015,16 @@ static int reiserfs_quota_on_mount(struct super_block *sb, int type)
* Standard function to be called on quota_on
*/
static int reiserfs_quota_on(struct super_block *sb, int type, int format_id,
char *path)
char *path, int remount)
{
int err;
struct nameidata nd;

if (!(REISERFS_SB(sb)->s_mount_opt & (1 << REISERFS_QUOTA)))
return -EINVAL;
/* No more checks needed? Path and format_id are bogus anyway... */
if (remount)
return vfs_quota_on(sb, type, format_id, path, 1);
err = path_lookup(path, LOOKUP_FOLLOW, &nd);
if (err)
return err;
Expand All @@ -2041,15 +2044,15 @@ static int reiserfs_quota_on(struct super_block *sb, int type, int format_id,
if (!REISERFS_SB(sb)->s_qf_names[USRQUOTA] &&
!REISERFS_SB(sb)->s_qf_names[GRPQUOTA]) {
path_put(&nd.path);
return vfs_quota_on(sb, type, format_id, path);
return vfs_quota_on(sb, type, format_id, path, 0);
}
/* Quotafile not of fs root? */
if (nd.path.dentry->d_parent->d_inode != sb->s_root->d_inode)
reiserfs_warning(sb,
"reiserfs: Quota file not on filesystem root. "
"Journalled quota will not work.");
path_put(&nd.path);
return vfs_quota_on(sb, type, format_id, path);
return vfs_quota_on(sb, type, format_id, path, 0);
}

/* Read data from quotafile - avoid pagecache and such because we cannot afford
Expand Down

0 comments on commit 6702577

Please sign in to comment.