aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jbd
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-04-03 17:33:42 -0400
committerDavid S. Miller <davem@davemloft.net>2008-04-03 17:33:42 -0400
commit3bb5da3837cc1aa17736b05139c9a22c3794851a (patch)
treec92d5684a866542b1cb20641607ac1643ce03a47 /fs/jbd
parent7feb49c82a74bc7c091b8ab2a3f96baa33d08ece (diff)
parent9597362d354f8655ece324b01d0c640a0e99c077 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'fs/jbd')
-rw-r--r--fs/jbd/journal.c9
-rw-r--r--fs/jbd/recovery.c2
-rw-r--r--fs/jbd/revoke.c4
-rw-r--r--fs/jbd/transaction.c8
4 files changed, 12 insertions, 11 deletions
diff --git a/fs/jbd/journal.c b/fs/jbd/journal.c
index 3943a8905eb2..0e081d5f32e8 100644
--- a/fs/jbd/journal.c
+++ b/fs/jbd/journal.c
@@ -697,13 +697,14 @@ fail:
697 */ 697 */
698 698
699/** 699/**
700 * journal_t * journal_init_dev() - creates an initialises a journal structure 700 * journal_t * journal_init_dev() - creates and initialises a journal structure
701 * @bdev: Block device on which to create the journal 701 * @bdev: Block device on which to create the journal
702 * @fs_dev: Device which hold journalled filesystem for this journal. 702 * @fs_dev: Device which hold journalled filesystem for this journal.
703 * @start: Block nr Start of journal. 703 * @start: Block nr Start of journal.
704 * @len: Length of the journal in blocks. 704 * @len: Length of the journal in blocks.
705 * @blocksize: blocksize of journalling device 705 * @blocksize: blocksize of journalling device
706 * @returns: a newly created journal_t * 706 *
707 * Returns: a newly created journal_t *
707 * 708 *
708 * journal_init_dev creates a journal which maps a fixed contiguous 709 * journal_init_dev creates a journal which maps a fixed contiguous
709 * range of blocks on an arbitrary block device. 710 * range of blocks on an arbitrary block device.
@@ -1619,14 +1620,14 @@ static int journal_init_journal_head_cache(void)
1619{ 1620{
1620 int retval; 1621 int retval;
1621 1622
1622 J_ASSERT(journal_head_cache == 0); 1623 J_ASSERT(journal_head_cache == NULL);
1623 journal_head_cache = kmem_cache_create("journal_head", 1624 journal_head_cache = kmem_cache_create("journal_head",
1624 sizeof(struct journal_head), 1625 sizeof(struct journal_head),
1625 0, /* offset */ 1626 0, /* offset */
1626 SLAB_TEMPORARY, /* flags */ 1627 SLAB_TEMPORARY, /* flags */
1627 NULL); /* ctor */ 1628 NULL); /* ctor */
1628 retval = 0; 1629 retval = 0;
1629 if (journal_head_cache == 0) { 1630 if (!journal_head_cache) {
1630 retval = -ENOMEM; 1631 retval = -ENOMEM;
1631 printk(KERN_EMERG "JBD: no memory for journal_head cache\n"); 1632 printk(KERN_EMERG "JBD: no memory for journal_head cache\n");
1632 } 1633 }
diff --git a/fs/jbd/recovery.c b/fs/jbd/recovery.c
index 2b8edf4d6eaa..43bc5e5ed064 100644
--- a/fs/jbd/recovery.c
+++ b/fs/jbd/recovery.c
@@ -478,7 +478,7 @@ static int do_one_pass(journal_t *journal,
478 memcpy(nbh->b_data, obh->b_data, 478 memcpy(nbh->b_data, obh->b_data,
479 journal->j_blocksize); 479 journal->j_blocksize);
480 if (flags & JFS_FLAG_ESCAPE) { 480 if (flags & JFS_FLAG_ESCAPE) {
481 *((__be32 *)bh->b_data) = 481 *((__be32 *)nbh->b_data) =
482 cpu_to_be32(JFS_MAGIC_NUMBER); 482 cpu_to_be32(JFS_MAGIC_NUMBER);
483 } 483 }
484 484
diff --git a/fs/jbd/revoke.c b/fs/jbd/revoke.c
index ad2eacf570c6..d5f8eee7c88c 100644
--- a/fs/jbd/revoke.c
+++ b/fs/jbd/revoke.c
@@ -173,13 +173,13 @@ int __init journal_init_revoke_caches(void)
173 0, 173 0,
174 SLAB_HWCACHE_ALIGN|SLAB_TEMPORARY, 174 SLAB_HWCACHE_ALIGN|SLAB_TEMPORARY,
175 NULL); 175 NULL);
176 if (revoke_record_cache == 0) 176 if (!revoke_record_cache)
177 return -ENOMEM; 177 return -ENOMEM;
178 178
179 revoke_table_cache = kmem_cache_create("revoke_table", 179 revoke_table_cache = kmem_cache_create("revoke_table",
180 sizeof(struct jbd_revoke_table_s), 180 sizeof(struct jbd_revoke_table_s),
181 0, SLAB_TEMPORARY, NULL); 181 0, SLAB_TEMPORARY, NULL);
182 if (revoke_table_cache == 0) { 182 if (!revoke_table_cache) {
183 kmem_cache_destroy(revoke_record_cache); 183 kmem_cache_destroy(revoke_record_cache);
184 revoke_record_cache = NULL; 184 revoke_record_cache = NULL;
185 return -ENOMEM; 185 return -ENOMEM;
diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c
index c6cbb6cd59b2..2c9e8f5d13aa 100644
--- a/fs/jbd/transaction.c
+++ b/fs/jbd/transaction.c
@@ -1426,7 +1426,8 @@ int journal_stop(handle_t *handle)
1426 return err; 1426 return err;
1427} 1427}
1428 1428
1429/**int journal_force_commit() - force any uncommitted transactions 1429/**
1430 * int journal_force_commit() - force any uncommitted transactions
1430 * @journal: journal to force 1431 * @journal: journal to force
1431 * 1432 *
1432 * For synchronous operations: force any uncommitted transactions 1433 * For synchronous operations: force any uncommitted transactions
@@ -1903,13 +1904,12 @@ zap_buffer_unlocked:
1903} 1904}
1904 1905
1905/** 1906/**
1906 * void journal_invalidatepage() 1907 * void journal_invalidatepage() - invalidate a journal page
1907 * @journal: journal to use for flush... 1908 * @journal: journal to use for flush
1908 * @page: page to flush 1909 * @page: page to flush
1909 * @offset: length of page to invalidate. 1910 * @offset: length of page to invalidate.
1910 * 1911 *
1911 * Reap page buffers containing data after offset in page. 1912 * Reap page buffers containing data after offset in page.
1912 *
1913 */ 1913 */
1914void journal_invalidatepage(journal_t *journal, 1914void journal_invalidatepage(journal_t *journal,
1915 struct page *page, 1915 struct page *page,