Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755917AbXJAF44 (ORCPT ); Mon, 1 Oct 2007 01:56:56 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751790AbXJAFwN (ORCPT ); Mon, 1 Oct 2007 01:52:13 -0400 Received: from filer.fsl.cs.sunysb.edu ([130.245.126.2]:40806 "EHLO filer.fsl.cs.sunysb.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753130AbXJAFvg (ORCPT ); Mon, 1 Oct 2007 01:51:36 -0400 From: Erez Zadok To: akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, viro@ftp.linux.org.uk, hch@infradead.org, Erez Zadok Subject: [PATCH 15/19] Unionfs: coding style: proper spacing Date: Mon, 1 Oct 2007 01:50:52 -0400 Message-Id: <1191217862337-git-send-email-ezk@cs.sunysb.edu> X-Mailer: git-send-email 1.5.2.2 X-MailKey: Erez_Zadok In-Reply-To: <1191217856647-git-send-email-ezk@cs.sunysb.edu> References: <1191217856647-git-send-email-ezk@cs.sunysb.edu> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 12414 Lines: 322 Signed-off-by: Erez Zadok --- fs/unionfs/copyup.c | 2 +- fs/unionfs/debug.c | 22 +++++++++++----------- fs/unionfs/dentry.c | 8 ++++---- fs/unionfs/fanout.h | 2 +- fs/unionfs/super.c | 14 +++++++------- fs/unionfs/union.h | 38 +++++++++++++++++++------------------- 6 files changed, 43 insertions(+), 43 deletions(-) diff --git a/fs/unionfs/copyup.c b/fs/unionfs/copyup.c index fb6fcae..560919a 100644 --- a/fs/unionfs/copyup.c +++ b/fs/unionfs/copyup.c @@ -875,7 +875,7 @@ void unionfs_postcopyup_release(struct dentry *dentry) int bindex; BUG_ON(S_ISDIR(dentry->d_inode->i_mode)); - for (bindex=dbstart(dentry)+1; bindex<=dbend(dentry); bindex++) { + for (bindex = dbstart(dentry)+1; bindex <= dbend(dentry); bindex++) { if (unionfs_lower_mnt_idx(dentry, bindex)) { unionfs_mntput(dentry, bindex); unionfs_set_lower_mnt_idx(dentry, bindex, NULL); diff --git a/fs/unionfs/debug.c b/fs/unionfs/debug.c index 984f940..c0d710f 100644 --- a/fs/unionfs/debug.c +++ b/fs/unionfs/debug.c @@ -20,7 +20,7 @@ #define PRINT_CALLER(fname, fxn, line) \ do { \ if (!printed_caller) { \ - pr_debug("PC:%s:%s:%d\n",(fname),(fxn),(line)); \ + pr_debug("PC:%s:%s:%d\n", (fname), (fxn), (line)); \ printed_caller = 1; \ } \ } while (0) @@ -310,7 +310,7 @@ void __unionfs_check_dentry(const struct dentry *dentry, /* check if lower inode is newer than upper one (it shouldn't) */ if (unlikely(is_newer_lower(dentry))) { PRINT_CALLER(fname, fxn, line); - for (bindex=ibstart(inode); bindex <= ibend(inode); bindex++) { + for (bindex = ibstart(inode); bindex <= ibend(inode); bindex++) { lower_inode = unionfs_lower_inode_idx(inode, bindex); if (unlikely(!lower_inode)) continue; @@ -413,7 +413,7 @@ void __unionfs_check_file(const struct file *file, } } - __unionfs_check_dentry(dentry,fname,fxn,line); + __unionfs_check_dentry(dentry, fname, fxn, line); } void __unionfs_check_nd(const struct nameidata *nd, @@ -445,14 +445,14 @@ void __show_branch_counts(const struct super_block *sb, struct vfsmount *mnt; pr_debug("BC:"); - for (i=0; is_root)) mnt = UNIONFS_D(sb->s_root)->lower_paths[i].mnt; else mnt = NULL; pr_debug("%d:", (mnt ? atomic_read(&mnt->mnt_count) : -99)); } - pr_debug("%s:%s:%d\n",file,fxn,line); + pr_debug("%s:%s:%d\n", file, fxn, line); } void __show_inode_times(const struct inode *inode, @@ -461,12 +461,12 @@ void __show_inode_times(const struct inode *inode, struct inode *lower_inode; int bindex; - for (bindex=ibstart(inode); bindex <= ibend(inode); bindex++) { + for (bindex = ibstart(inode); bindex <= ibend(inode); bindex++) { lower_inode = unionfs_lower_inode_idx(inode, bindex); if (unlikely(!lower_inode)) continue; pr_debug("IT(%lu:%d): ", inode->i_ino, bindex); - pr_debug("%s:%s:%d ",file,fxn,line); + pr_debug("%s:%s:%d ", file, fxn, line); pr_debug("um=%lu/%lu lm=%lu/%lu ", inode->i_mtime.tv_sec, inode->i_mtime.tv_nsec, lower_inode->i_mtime.tv_sec, @@ -485,13 +485,13 @@ void __show_dinode_times(const struct dentry *dentry, struct inode *lower_inode; int bindex; - for (bindex=ibstart(inode); bindex <= ibend(inode); bindex++) { + for (bindex = ibstart(inode); bindex <= ibend(inode); bindex++) { lower_inode = unionfs_lower_inode_idx(inode, bindex); if (!lower_inode) continue; pr_debug("DT(%s:%lu:%d): ", dentry->d_name.name, inode->i_ino, bindex); - pr_debug("%s:%s:%d ",file,fxn,line); + pr_debug("%s:%s:%d ", file, fxn, line); pr_debug("um=%lu/%lu lm=%lu/%lu ", inode->i_mtime.tv_sec, inode->i_mtime.tv_nsec, lower_inode->i_mtime.tv_sec, @@ -513,7 +513,7 @@ void __show_inode_counts(const struct inode *inode, pr_debug("SiC: Null inode\n"); return; } - for (bindex=sbstart(inode->i_sb); bindex <= sbend(inode->i_sb); + for (bindex = sbstart(inode->i_sb); bindex <= sbend(inode->i_sb); bindex++) { lower_inode = unionfs_lower_inode_idx(inode, bindex); if (unlikely(!lower_inode)) @@ -521,6 +521,6 @@ void __show_inode_counts(const struct inode *inode, pr_debug("SIC(%lu:%d:%d): ", inode->i_ino, bindex, atomic_read(&(inode)->i_count)); pr_debug("lc=%d ", atomic_read(&(lower_inode)->i_count)); - pr_debug("%s:%s:%d\n",file,fxn,line); + pr_debug("%s:%s:%d\n", file, fxn, line); } } diff --git a/fs/unionfs/dentry.c b/fs/unionfs/dentry.c index 8891c53..49323de 100644 --- a/fs/unionfs/dentry.c +++ b/fs/unionfs/dentry.c @@ -337,7 +337,7 @@ bool __unionfs_d_revalidate_chain(struct dentry *dentry, struct nameidata *nd, * if failed, then sleep for a little, then retry. */ dtmp = dentry->d_parent; - for (i=chain_len-1; i>=0; i--) { + for (i = chain_len-1; i >= 0; i--) { chain[i] = dget(dtmp); dtmp = dtmp->d_parent; } @@ -346,7 +346,7 @@ bool __unionfs_d_revalidate_chain(struct dentry *dentry, struct nameidata *nd, * call __unionfs_d_revalidate_one() on each dentry, but in parent * to child order. */ - for (i=0; i 0) { - for (i=0; id_inode && !unionfs_lower_mnt_idx(dentry,bindex)) + if (!dentry->d_inode && !unionfs_lower_mnt_idx(dentry, bindex)) continue; unionfs_mntput(dentry, bindex); unionfs_set_lower_mnt_idx(dentry, bindex, NULL); diff --git a/fs/unionfs/fanout.h b/fs/unionfs/fanout.h index 536a51f..8d5f15e 100644 --- a/fs/unionfs/fanout.h +++ b/fs/unionfs/fanout.h @@ -310,7 +310,7 @@ static inline void unionfs_copy_attr_times(struct inode *upper) if (!upper || ibstart(upper) < 0) return; - for (bindex=ibstart(upper); bindex <= ibend(upper); bindex++) { + for (bindex = ibstart(upper); bindex <= ibend(upper); bindex++) { lower = unionfs_lower_inode_idx(upper, bindex); if (!lower) continue; /* not all lower dir objects may exist */ diff --git a/fs/unionfs/super.c b/fs/unionfs/super.c index 647b08c..45dc66e 100644 --- a/fs/unionfs/super.c +++ b/fs/unionfs/super.c @@ -202,7 +202,7 @@ static noinline int do_remount_mode_option(char *optarg, int cur_branches, optarg, err); goto out; } - for (idx=0; idxs_root)->lower_paths, cur_branches * sizeof(struct path)); - for (i=0; is_root); i<=dbend(sb->s_root); i++) { + for (i = dbstart(sb->s_root); i <= dbend(sb->s_root); i++) { struct dentry *lower_dentry = unionfs_lower_dentry_idx(sb->s_root, i); igrab(lower_dentry->d_inode); new_lower_inodes[i] = lower_dentry->d_inode; } /* 2. release reference on all older lower inodes */ - for (i=old_ibstart; i<=old_ibend; i++) { + for (i = old_ibstart; i <= old_ibend; i++) { iput(unionfs_lower_inode_idx(sb->s_root->d_inode, i)); unionfs_set_lower_inode_idx(sb->s_root->d_inode, i, NULL); } @@ -785,7 +785,7 @@ out_no_change: out_release: /* no need to cleanup/release anything in tmp_data */ if (tmp_lower_paths) - for (i=0; i