Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 344842
b: refs/heads/master
c: fd47d3e
h: refs/heads/master
v: v3
  • Loading branch information
Behan Webster authored and Theodore Ts'o committed Nov 8, 2012
1 parent e538cd9 commit fca5c84
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 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: 37be2f59d3149b95afaeeeff94edde2c07f165d2
refs/heads/master: fd47d3e1c2949838e858379aaf2bc20647be2912
8 changes: 7 additions & 1 deletion trunk/include/linux/jbd2.h
Original file line number Diff line number Diff line change
Expand Up @@ -1302,15 +1302,21 @@ static inline int jbd_space_needed(journal_t *journal)

extern int jbd_blocks_per_page(struct inode *inode);

/* JBD uses a CRC32 checksum */
#define JBD_MAX_CHECKSUM_SIZE 4

static inline u32 jbd2_chksum(journal_t *journal, u32 crc,
const void *address, unsigned int length)
{
struct {
struct shash_desc shash;
char ctx[crypto_shash_descsize(journal->j_chksum_driver)];
char ctx[JBD_MAX_CHECKSUM_SIZE];
} desc;
int err;

BUG_ON(crypto_shash_descsize(journal->j_chksum_driver) >
JBD_MAX_CHECKSUM_SIZE);

desc.shash.tfm = journal->j_chksum_driver;
desc.shash.flags = 0;
*(u32 *)desc.ctx = crc;
Expand Down

0 comments on commit fca5c84

Please sign in to comment.