From: Erez Zadok Date: Fri, 16 Nov 2007 18:45:38 +0000 (-0500) Subject: Unionfs: coding style: miscellaneous fixes X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=be6d03cf86ae24f39cdc8cfa9a6b4fd4ae2c8026;p=unionfs-odf.git Unionfs: coding style: miscellaneous fixes No braces around single-statement if's. No externs in .c files. use not . Use (foo *) not (foo*). Signed-off-by: Erez Zadok --- diff --git a/fs/unionfs/rdstate.c b/fs/unionfs/rdstate.c index 378a636be4..95c48182ec 100644 --- a/fs/unionfs/rdstate.c +++ b/fs/unionfs/rdstate.c @@ -186,12 +186,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; } } diff --git a/fs/unionfs/super.c b/fs/unionfs/super.c index 72ac56d88d..4966c44452 100644 --- a/fs/unionfs/super.c +++ b/fs/unionfs/super.c @@ -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); @@ -969,7 +968,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; diff --git a/fs/unionfs/union.h b/fs/unionfs/union.h index 2e10670e84..cad76d2c64 100644 --- a/fs/unionfs/union.h +++ b/fs/unionfs/union.h @@ -44,8 +44,8 @@ #include #include #include +#include -#include #include #include @@ -72,6 +72,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; #if defined(CONFIG_EXPORTFS) || defined(CONFIG_EXPORTFS_MODULE) extern struct export_operations unionfs_export_ops; diff --git a/fs/unionfs/xattr.c b/fs/unionfs/xattr.c index 71ff7d0a07..602cedfc4b 100644 --- a/fs/unionfs/xattr.c +++ b/fs/unionfs/xattr.c @@ -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);