Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 155445
b: refs/heads/master
c: e6b5d30
h: refs/heads/master
i:
  155443: d4f6546
v: v3
  • Loading branch information
Curt Wohlgemuth authored and Theodore Ts'o committed Jul 13, 2009
1 parent 8fb97b4 commit 4da55d1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 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: 62e086be5d2abef8cad854bc5707329ad345f2ec
refs/heads/master: e6b5d30104db5f34110678ecab14988f1f1eff63
4 changes: 4 additions & 0 deletions trunk/fs/ext4/ext4_jbd2.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ int __ext4_journal_forget(const char *where, handle_t *handle,
ext4_journal_abort_handle(where, __func__, bh,
handle, err);
}
else
brelse(bh);
return err;
}

Expand All @@ -57,6 +59,8 @@ int __ext4_journal_revoke(const char *where, handle_t *handle,
ext4_journal_abort_handle(where, __func__, bh,
handle, err);
}
else
brelse(bh);
return err;
}

Expand Down
2 changes: 2 additions & 0 deletions trunk/fs/ext4/ext4_jbd2.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,11 @@ int __ext4_journal_get_undo_access(const char *where, handle_t *handle,
int __ext4_journal_get_write_access(const char *where, handle_t *handle,
struct buffer_head *bh);

/* When called with an invalid handle, this will still do a put on the BH */
int __ext4_journal_forget(const char *where, handle_t *handle,
struct buffer_head *bh);

/* When called with an invalid handle, this will still do a put on the BH */
int __ext4_journal_revoke(const char *where, handle_t *handle,
ext4_fsblk_t blocknr, struct buffer_head *bh);

Expand Down
6 changes: 2 additions & 4 deletions trunk/fs/ext4/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,14 @@ static int ext4_inode_is_fast_symlink(struct inode *inode)
* but there may still be a record of it in the journal, and that record
* still needs to be revoked.
*
* If the handle isn't valid we're not journaling so there's nothing to do.
* If the handle isn't valid we're not journaling, but we still need to
* call into ext4_journal_revoke() to put the buffer head.
*/
int ext4_forget(handle_t *handle, int is_metadata, struct inode *inode,
struct buffer_head *bh, ext4_fsblk_t blocknr)
{
int err;

if (!ext4_handle_valid(handle))
return 0;

might_sleep();

BUFFER_TRACE(bh, "enter");
Expand Down

0 comments on commit 4da55d1

Please sign in to comment.