Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 206311
b: refs/heads/master
c: 62d2b5f
h: refs/heads/master
i:
  206309: 223753d
  206307: 4fa0554
  206303: dc639c1
v: v3
  • Loading branch information
Jan Kara authored and Theodore Ts'o committed Jul 27, 2010
1 parent 4d4b62e commit bce9136
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 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: dcc7dae3cb21184a317f10a12250bd8d6f458077
refs/heads/master: 62d2b5f2dcd3707b070efb16bbfdf6947c38c194
19 changes: 5 additions & 14 deletions trunk/fs/ext4/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -4138,7 +4138,6 @@ static ssize_t ext4_quota_write(struct super_block *sb, int type,
ext4_lblk_t blk = off >> EXT4_BLOCK_SIZE_BITS(sb);
int err = 0;
int offset = off & (sb->s_blocksize - 1);
int journal_quota = EXT4_SB(sb)->s_qf_names[type] != NULL;
struct buffer_head *bh;
handle_t *handle = journal_current_handle();

Expand All @@ -4163,24 +4162,16 @@ static ssize_t ext4_quota_write(struct super_block *sb, int type,
bh = ext4_bread(handle, inode, blk, 1, &err);
if (!bh)
goto out;
if (journal_quota) {
err = ext4_journal_get_write_access(handle, bh);
if (err) {
brelse(bh);
goto out;
}
err = ext4_journal_get_write_access(handle, bh);
if (err) {
brelse(bh);
goto out;
}
lock_buffer(bh);
memcpy(bh->b_data+offset, data, len);
flush_dcache_page(bh->b_page);
unlock_buffer(bh);
if (journal_quota)
err = ext4_handle_dirty_metadata(handle, NULL, bh);
else {
/* Always do at least ordered writes for quotas */
err = ext4_jbd2_file_inode(handle, inode);
mark_buffer_dirty(bh);
}
err = ext4_handle_dirty_metadata(handle, NULL, bh);
brelse(bh);
out:
if (err) {
Expand Down

0 comments on commit bce9136

Please sign in to comment.