commit 6b1cf3a14e812defc7acb71bfd8060b51f6aee53
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Sun Sep 30 13:52:36 2007 -0400
Unionfs: coding style: proper spacing
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
diff --git a/fs/unionfs/copyup.c b/fs/unionfs/copyup.c
index 037cb06..15c7555 100644
--- a/fs/unionfs/copyup.c
+++ b/fs/unionfs/copyup.c
@@ -869,7 +869,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 818bf56..45f9eee 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);
}
/* useful to track vfsmount leaks that could cause EBUSY on unmount */
@@ -424,14 +424,14 @@ void __show_branch_counts(const struct super_block *sb,
struct vfsmount *mnt;
pr_debug("BC:");
- for (i=0; i<sbmax(sb); i++) {
+ for (i = 0; i < sbmax(sb); i++) {
if (likely(sb->s_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,
@@ -440,12 +440,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,
@@ -464,13 +464,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,
@@ -492,7 +492,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))
@@ -500,6 +500,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 1a41947..af3de16 100644
--- a/fs/unionfs/dentry.c
+++ b/fs/unionfs/dentry.c
@@ -330,7 +330,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;
}
@@ -339,7 +339,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<chain_len; i++) {
+ for (i = 0; i < chain_len; i++) {
unionfs_lock_dentry(chain[i]);
saved_bstart = dbstart(chain[i]);
saved_bend = dbend(chain[i]);
@@ -402,7 +402,7 @@ out_this:
out_free:
/* unlock/dput all dentries in chain and return status */
if (chain_len > 0) {
- for (i=0; i<chain_len; i++)
+ for (i = 0; i < chain_len; i++)
dput(chain[i]);
kfree(chain);
}
@@ -458,7 +458,7 @@ static void unionfs_d_release(struct dentry *dentry)
dput(unionfs_lower_dentry_idx(dentry, bindex));
unionfs_set_lower_dentry_idx(dentry, bindex, NULL);
/* NULL lower mnt is ok if this is a negative dentry */
- if (!dentry->d_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/mmap.c b/fs/unionfs/mmap.c
index 5ce1fc2..5efbf39 100644
--- a/fs/unionfs/mmap.c
+++ b/fs/unionfs/mmap.c
@@ -102,7 +102,7 @@ static int unionfs_writepage(struct page *page, struct
writeback_control *wbc)
BUG_ON(!lower_inode->i_mapping->a_ops->writepage);
/* workaround for some lower file systems: see big comment on top */
- if (wbc->for_writepages /* && !wbc->fs_private */)
+ if (wbc->for_writepages)
wbc->for_writepages = 0;
/* call lower writepage (expects locked page) */
diff --git a/fs/unionfs/super.c b/fs/unionfs/super.c
index 0fc8043..4d3251c 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; idx<cur_branches; idx++)
+ for (idx = 0; idx < cur_branches; idx++)
if (nd.mnt == new_lower_paths[idx].mnt &&
nd.dentry == new_lower_paths[idx].dentry)
break;
@@ -245,7 +245,7 @@ static noinline int do_remount_del_option(char *optarg, int
cur_branches,
optarg, err);
goto out;
}
- for (idx=0; idx < cur_branches; idx++)
+ for (idx = 0; idx < cur_branches; idx++)
if (nd.mnt == new_lower_paths[idx].mnt &&
nd.dentry == new_lower_paths[idx].dentry)
break;
@@ -329,7 +329,7 @@ static noinline int do_remount_add_option(char *optarg, int
cur_branches,
optarg, err);
goto out;
}
- for (idx=0; idx < cur_branches; idx++)
+ for (idx = 0; idx < cur_branches; idx++)
if (nd.mnt == new_lower_paths[idx].mnt &&
nd.dentry == new_lower_paths[idx].dentry)
break;
@@ -540,7 +540,7 @@ static int unionfs_remount_fs(struct super_block *sb, int
*flags,
cur_branches * sizeof(struct unionfs_data));
memcpy(tmp_lower_paths, UNIONFS_D(sb->s_root)->lower_paths,
cur_branches * sizeof(struct path));
- for (i=0; i<cur_branches; i++)
+ for (i = 0; i < cur_branches; i++)
pathget(&tmp_lower_paths[i]); /* drop refs at end of fxn */
/*******************************************************************
@@ -743,14 +743,14 @@ out_no_change:
* Update lower inodes: 3 steps
* 1. grab ref on all new lower inodes
*/
- for (i=dbstart(sb->s_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<new_branches; i++)
+ for (i = 0; i < new_branches; i++)
pathput(&tmp_lower_paths[i]);
out_free:
kfree(tmp_lower_paths);
diff --git a/fs/unionfs/union.h b/fs/unionfs/union.h
index 19dbcc7..6d5980a 100644
--- a/fs/unionfs/union.h
+++ b/fs/unionfs/union.h
@@ -394,7 +394,7 @@ static inline int is_robranch_super(const struct
super_block *sb, int index)
{
int ret;
- ret = (!(branchperms(sb, index) & MAY_WRITE)) ? -EROFS : 0;
+ ret = (!(branchperms(sb, index) & MAY_WRITE)) ? -EROFS : 0;
return ret;
}
@@ -509,22 +509,22 @@ static inline void unionfs_mntput(struct dentry *dentry,
int bindex)
#ifdef CONFIG_UNION_FS_DEBUG
/* useful for tracking code reachability */
-#define UDBG pr_debug("DBG:%s:%s:%d\n",__FILE__,__FUNCTION__,__LINE__)
+#define UDBG pr_debug("DBG:%s:%s:%d\n", __FILE__, __FUNCTION__, __LINE__)
#define unionfs_check_inode(i) __unionfs_check_inode((i), \
- __FILE__,__FUNCTION__,__LINE__)
+ __FILE__, __FUNCTION__, __LINE__)
#define unionfs_check_dentry(d) __unionfs_check_dentry((d), \
- __FILE__,__FUNCTION__,__LINE__)
+ __FILE__, __FUNCTION__, __LINE__)
#define unionfs_check_file(f) __unionfs_check_file((f), \
- __FILE__,__FUNCTION__,__LINE__)
+ __FILE__, __FUNCTION__, __LINE__)
#define show_branch_counts(sb) __show_branch_counts((sb), \
- __FILE__,__FUNCTION__,__LINE__)
+ __FILE__, __FUNCTION__, __LINE__)
#define show_inode_times(i) __show_inode_times((i), \
- __FILE__,__FUNCTION__,__LINE__)
+ __FILE__, __FUNCTION__, __LINE__)
#define show_dinode_times(d) __show_dinode_times((d), \
- __FILE__,__FUNCTION__,__LINE__)
+ __FILE__, __FUNCTION__, __LINE__)
#define show_inode_counts(i) __show_inode_counts((i), \
- __FILE__,__FUNCTION__,__LINE__)
+ __FILE__, __FUNCTION__, __LINE__)
extern void __unionfs_check_inode(const struct inode *inode, const char *fname,
const char *fxn, int line);
@@ -540,19 +540,19 @@ extern void __show_inode_times(const struct inode *inode,
extern void __show_dinode_times(const struct dentry *dentry,
const char *file, const char *fxn, int line);
extern void __show_inode_counts(const struct inode *inode,
- const char *file, const char *fxn, int line);
+ const char *file, const char *fxn, int line);
#else /* not CONFIG_UNION_FS_DEBUG */
/* we leave useful hooks for these check functions throughout the code */
-#define unionfs_check_inode(i) do { } while(0)
-#define unionfs_check_dentry(d) do { } while(0)
-#define unionfs_check_file(f) do { } while(0)
-#define unionfs_check_nd(n) do { } while(0)
-#define show_branch_counts(sb) do { } while(0)
-#define show_inode_times(i) do { } while(0)
-#define show_dinode_times(d) do { } while(0)
-#define show_inode_counts(i) do { } while(0)
+#define unionfs_check_inode(i) do { } while (0)
+#define unionfs_check_dentry(d) do { } while (0)
+#define unionfs_check_file(f) do { } while (0)
+#define unionfs_check_nd(n) do { } while (0)
+#define show_branch_counts(sb) do { } while (0)
+#define show_inode_times(i) do { } while (0)
+#define show_dinode_times(d) do { } while (0)
+#define show_inode_counts(i) do { } while (0)
#endif /* not CONFIG_UNION_FS_DEBUG */
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs