Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135899
b: refs/heads/master
c: 643d00c
h: refs/heads/master
i:
  135897: a6addef
  135895: c3c9da9
v: v3
  • Loading branch information
Jan Kara committed Mar 26, 2009
1 parent 1782101 commit e73e694
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 57 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: edf7245362f7b8b8c76c4a6cad3604bf80884848
refs/heads/master: 643d00ccc311664188c8209bf8b596a30e139c3a
58 changes: 2 additions & 56 deletions trunk/fs/reiserfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -629,8 +629,6 @@ static const struct super_operations reiserfs_sops = {
#ifdef CONFIG_QUOTA
#define QTYPE2NAME(t) ((t)==USRQUOTA?"user":"group")

static int reiserfs_dquot_initialize(struct inode *, int);
static int reiserfs_dquot_drop(struct inode *);
static int reiserfs_write_dquot(struct dquot *);
static int reiserfs_acquire_dquot(struct dquot *);
static int reiserfs_release_dquot(struct dquot *);
Expand All @@ -639,8 +637,8 @@ static int reiserfs_write_info(struct super_block *, int);
static int reiserfs_quota_on(struct super_block *, int, int, char *, int);

static struct dquot_operations reiserfs_quota_operations = {
.initialize = reiserfs_dquot_initialize,
.drop = reiserfs_dquot_drop,
.initialize = dquot_initialize,
.drop = dquot_drop,
.alloc_space = dquot_alloc_space,
.alloc_inode = dquot_alloc_inode,
.free_space = dquot_free_space,
Expand Down Expand Up @@ -1896,58 +1894,6 @@ static int reiserfs_statfs(struct dentry *dentry, struct kstatfs *buf)
}

#ifdef CONFIG_QUOTA
static int reiserfs_dquot_initialize(struct inode *inode, int type)
{
struct reiserfs_transaction_handle th;
int ret, err;

/* We may create quota structure so we need to reserve enough blocks */
reiserfs_write_lock(inode->i_sb);
ret =
journal_begin(&th, inode->i_sb,
2 * REISERFS_QUOTA_INIT_BLOCKS(inode->i_sb));
if (ret)
goto out;
ret = dquot_initialize(inode, type);
err =
journal_end(&th, inode->i_sb,
2 * REISERFS_QUOTA_INIT_BLOCKS(inode->i_sb));
if (!ret && err)
ret = err;
out:
reiserfs_write_unlock(inode->i_sb);
return ret;
}

static int reiserfs_dquot_drop(struct inode *inode)
{
struct reiserfs_transaction_handle th;
int ret, err;

/* We may delete quota structure so we need to reserve enough blocks */
reiserfs_write_lock(inode->i_sb);
ret =
journal_begin(&th, inode->i_sb,
2 * REISERFS_QUOTA_DEL_BLOCKS(inode->i_sb));
if (ret) {
/*
* We call dquot_drop() anyway to at least release references
* to quota structures so that umount does not hang.
*/
dquot_drop(inode);
goto out;
}
ret = dquot_drop(inode);
err =
journal_end(&th, inode->i_sb,
2 * REISERFS_QUOTA_DEL_BLOCKS(inode->i_sb));
if (!ret && err)
ret = err;
out:
reiserfs_write_unlock(inode->i_sb);
return ret;
}

static int reiserfs_write_dquot(struct dquot *dquot)
{
struct reiserfs_transaction_handle th;
Expand Down

0 comments on commit e73e694

Please sign in to comment.