Unionfs: coding style: miscellaneous fixes
authorErez Zadok <ezk@cs.sunysb.edu>
Sun, 30 Sep 2007 01:55:45 +0000 (21:55 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Thu, 18 Oct 2007 18:11:18 +0000 (14:11 -0400)
No braces around single-statement if's.
No externs in .c files.
use <linux/mman.h> not <asm/mman.h>.
Use (foo *) not (foo*).

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/rdstate.c
fs/unionfs/super.c
fs/unionfs/union.h
fs/unionfs/xattr.c

index 07e0ba8e74a4db648b923303dbeb7ec69145affe..a47b1878d913e76df3ecdaf888e6df985d9f4198 100644 (file)
@@ -218,12 +218,11 @@ struct filldir_node *find_filldir_node(struct unionfs_dir_state *rdstate,
                         * if the duplicate is in this branch, then the file
                         * system is corrupted.
                         */
-                       if (unlikely(cursor->bindex == rdstate->bindex)) {
+                       if (unlikely(cursor->bindex == rdstate->bindex))
                                printk(KERN_ERR "unionfs: filldir: possible "
                                       "I/O error: a file is duplicated "
                                       "in the same branch %d: %s\n",
                                       rdstate->bindex, cursor->name);
-                       }
                        break;
                }
        }
index ffffe01af1bc25534fb45fcbfc0c083359b73a02..ed2a0f9fd4973e0d619205c25c393689b460b3ed 100644 (file)
@@ -26,7 +26,6 @@ static struct kmem_cache *unionfs_inode_cachep;
 
 static void unionfs_read_inode(struct inode *inode)
 {
-       extern struct address_space_operations unionfs_aops;
        int size;
        struct unionfs_inode_info *info = UNIONFS_I(inode);
 
@@ -965,7 +964,7 @@ static int unionfs_show_options(struct seq_file *m, struct vfsmount *mnt)
 
        unionfs_lock_dentry(sb->s_root);
 
-       tmp_page = (char*) __get_free_page(GFP_KERNEL);
+       tmp_page = (char *) __get_free_page(GFP_KERNEL);
        if (unlikely(!tmp_page)) {
                ret = -ENOMEM;
                goto out;
index 6d5980a1eb92620e21a1ecefc98c58ae81368b9f..07d67813a2a8f7bd7a11fdb321a37a90c8b2aed9 100644 (file)
@@ -44,8 +44,8 @@
 #include <linux/magic.h>
 #include <linux/log2.h>
 #include <linux/poison.h>
+#include <linux/mman.h>
 
-#include <asm/mman.h>
 #include <asm/system.h>
 
 #include <linux/union_fs.h>
@@ -70,6 +70,7 @@ extern struct inode_operations unionfs_dir_iops;
 extern struct inode_operations unionfs_symlink_iops;
 extern struct super_operations unionfs_sops;
 extern struct dentry_operations unionfs_dops;
+extern struct address_space_operations unionfs_aops;
 
 /* How long should an entry be allowed to persist */
 #define RDCACHE_JIFFIES        (5*HZ)
index 71ff7d0a072c49ddc710e8b90b7ddc453c98c12c..602cedfc4b21c53ebb19e8cad19a4844045d126d 100644 (file)
@@ -55,7 +55,7 @@ ssize_t unionfs_getxattr(struct dentry *dentry, const char *name, void *value,
 
        lower_dentry = unionfs_lower_dentry(dentry);
 
-       err = vfs_getxattr(lower_dentry, (char*) name, value, size);
+       err = vfs_getxattr(lower_dentry, (char *) name, value, size);
 
 out:
        unionfs_unlock_dentry(dentry);
@@ -84,7 +84,7 @@ int unionfs_setxattr(struct dentry *dentry, const char *name,
 
        lower_dentry = unionfs_lower_dentry(dentry);
 
-       err = vfs_setxattr(lower_dentry, (char*) name, (void*) value,
+       err = vfs_setxattr(lower_dentry, (char *) name, (void *) value,
                           size, flags);
 
 out:
@@ -113,7 +113,7 @@ int unionfs_removexattr(struct dentry *dentry, const char *name)
 
        lower_dentry = unionfs_lower_dentry(dentry);
 
-       err = vfs_removexattr(lower_dentry, (char*) name);
+       err = vfs_removexattr(lower_dentry, (char *) name);
 
 out:
        unionfs_unlock_dentry(dentry);