reiserfs: strip trailing whitespace
[pandora-kernel.git] / fs / reiserfs / tail_conversion.c
index c92e124..0635cfe 100644 (file)
@@ -2,7 +2,6 @@
  * Copyright 1999 Hans Reiser, see reiserfs/README for licensing and copyright details
  */
 
-#include <linux/config.h>
 #include <linux/time.h>
 #include <linux/pagemap.h>
 #include <linux/buffer_head.h>
@@ -16,7 +15,7 @@
 /* path points to first direct item of the file regarless of how many of
    them are there */
 int direct2indirect(struct reiserfs_transaction_handle *th, struct inode *inode,
-                   struct path *path, struct buffer_head *unbh,
+                   struct treepath *path, struct buffer_head *unbh,
                    loff_t tail_offset)
 {
        struct super_block *sb = inode->i_sb;
@@ -47,11 +46,11 @@ int direct2indirect(struct reiserfs_transaction_handle *th, struct inode *inode,
        /* Set the key to search for the place for new unfm pointer */
        make_cpu_key(&end_key, inode, tail_offset, TYPE_INDIRECT, 4);
 
-       // FIXME: we could avoid this 
+       /* FIXME: we could avoid this */
        if (search_for_position_by_key(sb, &end_key, path) == POSITION_FOUND) {
-               reiserfs_warning(sb, "PAP-14030: direct2indirect: "
-                                "pasted or inserted byte exists in the tree %K. "
-                                "Use fsck to repair.", &end_key);
+               reiserfs_error(sb, "PAP-14030",
+                              "pasted or inserted byte exists in "
+                              "the tree %K. Use fsck to repair.", &end_key);
                pathrelse(path);
                return -EIO;
        }
@@ -93,8 +92,7 @@ int direct2indirect(struct reiserfs_transaction_handle *th, struct inode *inode,
                   last item of the file */
                if (search_for_position_by_key(sb, &end_key, path) ==
                    POSITION_FOUND)
-                       reiserfs_panic(sb,
-                                      "PAP-14050: direct2indirect: "
+                       reiserfs_panic(sb, "PAP-14050",
                                       "direct item (%K) not found", &end_key);
                p_le_ih = PATH_PITEM_HEAD(path);
                RFALSE(!is_direct_le_ih(p_le_ih),
@@ -172,7 +170,7 @@ void reiserfs_unmap_buffer(struct buffer_head *bh)
    what we expect from it (number of cut bytes). But when tail remains
    in the unformatted node, we set mode to SKIP_BALANCING and unlock
    inode */
-int indirect2direct(struct reiserfs_transaction_handle *th, struct inode *p_s_inode, struct page *page, struct path *p_s_path, /* path to the indirect item. */
+int indirect2direct(struct reiserfs_transaction_handle *th, struct inode *p_s_inode, struct page *page, struct treepath *p_s_path,     /* path to the indirect item. */
                    const struct cpu_key *p_s_item_key, /* Key to look for unformatted node pointer to be cut. */
                    loff_t n_new_file_size,     /* New file size. */
                    char *p_c_mode)
@@ -205,7 +203,7 @@ int indirect2direct(struct reiserfs_transaction_handle *th, struct inode *p_s_in
                                         1) * p_s_sb->s_blocksize;
        pos1 = pos;
 
-       // we are protected by i_sem. The tail can not disapper, not
+       // we are protected by i_mutex. The tail can not disapper, not
        // append can be done either
        // we are in truncate or packing tail in file_release
 
@@ -215,8 +213,7 @@ int indirect2direct(struct reiserfs_transaction_handle *th, struct inode *p_s_in
                /* re-search indirect item */
                if (search_for_position_by_key(p_s_sb, p_s_item_key, p_s_path)
                    == POSITION_NOT_FOUND)
-                       reiserfs_panic(p_s_sb,
-                                      "PAP-5520: indirect2direct: "
+                       reiserfs_panic(p_s_sb, "PAP-5520",
                                       "item to be converted %K does not exist",
                                       p_s_item_key);
                copy_item_head(&s_ih, PATH_PITEM_HEAD(p_s_path));
@@ -225,8 +222,8 @@ int indirect2direct(struct reiserfs_transaction_handle *th, struct inode *p_s_in
                    (ih_item_len(&s_ih) / UNFM_P_SIZE -
                     1) * p_s_sb->s_blocksize;
                if (pos != pos1)
-                       reiserfs_panic(p_s_sb, "vs-5530: indirect2direct: "
-                                      "tail position changed while we were reading it");
+                       reiserfs_panic(p_s_sb, "vs-5530", "tail position "
+                                      "changed while we were reading it");
 #endif
        }