commit 7265e5161895b530088486208e172d2c95ff70b2
Author: Erez Zadok <[EMAIL PROTECTED]>
Date:   Sun Sep 30 14:32:29 2007 -0400

    Unionfs: coding style: avoid lines longer than 80 chars
    
    Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>

diff --git a/fs/unionfs/commonfops.c b/fs/unionfs/commonfops.c
index b13bb20..194391a 100644
--- a/fs/unionfs/commonfops.c
+++ b/fs/unionfs/commonfops.c
@@ -182,9 +182,8 @@ static int open_all_files(struct file *file)
                if (IS_ERR(lower_file)) {
                        err = PTR_ERR(lower_file);
                        goto out;
-               } else {
+               } else
                        unionfs_set_lower_file_idx(file, bindex, lower_file);
-               }
        }
 out:
        return err;
@@ -339,7 +338,8 @@ int unionfs_file_revalidate(struct file *file, bool 
willwrite)
        if (unlikely(!d_deleted(dentry) &&
                     (sbgen > fgen || dbstart(dentry) != fbstart(file)))) {
                /* save orig branch ID */
-               int orig_brid = 
UNIONFS_F(file)->saved_branch_ids[fbstart(file)];
+               int orig_brid =
+                       UNIONFS_F(file)->saved_branch_ids[fbstart(file)];
 
                /* First we throw out the existing files. */
                cleanup_file(file);
@@ -388,7 +388,8 @@ int unionfs_file_revalidate(struct file *file, bool 
willwrite)
                        }
                }
                atomic_set(&UNIONFS_F(file)->generation,
-                          
atomic_read(&UNIONFS_I(dentry->d_inode)->generation));
+                          atomic_read(&UNIONFS_I(
+                                         dentry->d_inode)->generation));
        }
 
        /* Copyup on the first write to a file on a readonly branch. */
diff --git a/fs/unionfs/compat.h b/fs/unionfs/compat.h
index 63a3f33..969cff7 100644
--- a/fs/unionfs/compat.h
+++ b/fs/unionfs/compat.h
@@ -29,7 +29,8 @@ extern void *krealloc2(size_t oldsize, void *ptr, size_t 
newsize, int flags);
 #define SEEK_CUR       1       /* seek relative to current file position */
 #define SEEK_END       2       /* seek relative to end of file */
 #define SEEK_MAX       SEEK_END
-#define lookup_one_len_nd(name, base, len, nd) lookup_one_len((name), (base), 
(len))
+#define lookup_one_len_nd(name, base, len, nd) \
+               lookup_one_len((name), (base), (len))
 /* define compatible boolean type */
 #define bool int
 #define false (0)
@@ -58,7 +59,8 @@ static inline void pathput(struct path *path)
  * lhs == rhs: return 0
  * lhs > rhs:  return >0
  */
-static inline int timespec_compare(const struct timespec *lhs, const struct 
timespec *rhs)
+static inline int timespec_compare(const struct timespec *lhs,
+                                  const struct timespec *rhs)
 {
        if (lhs->tv_sec < rhs->tv_sec)
                return -1;
diff --git a/fs/unionfs/debug.c b/fs/unionfs/debug.c
index 8607aae..f3896fe 100644
--- a/fs/unionfs/debug.c
+++ b/fs/unionfs/debug.c
@@ -157,27 +157,26 @@ void __unionfs_check_dentry(const struct dentry *dentry,
                                         bindex, dstart, dend);
                        }
                } else {        /* lower_dentry == NULL */
-                       if (bindex >= dstart && bindex <= dend) {
-                               /*
-                                * Directories can have NULL lower inodes in
-                                * b/t start/end, but NOT if at the
-                                * start/end range.  Ignore this rule,
-                                * however, if this is a NULL dentry or a
-                                * deleted dentry.
-                                */
-                               if (unlikely(!d_deleted((struct dentry *) 
dentry) &&
-                                            inode &&
-                                            !(inode && S_ISDIR(inode->i_mode) 
&&
-                                              bindex > dstart && bindex < 
dend))) {
-                                       PRINT_CALLER(fname, fxn, line);
-                                       pr_debug(" CD2: dentry/lower=%p:%p(%p) "
-                                                "bindex=%d dstart/end=%d:%d\n",
-                                                dentry, lower_dentry,
-                                                (lower_dentry ?
-                                                 lower_dentry->d_inode :
-                                                 (void *) -1L),
-                                                bindex, dstart, dend);
-                               }
+                       if (bindex < dstart || bindex > dend)
+                               continue;
+                       /*
+                        * Directories can have NULL lower inodes in b/t
+                        * start/end, but NOT if at the start/end range.
+                        * Ignore this rule, however, if this is a NULL
+                        * dentry or a deleted dentry.
+                        */
+                       if (unlikely(!d_deleted((struct dentry *) dentry) &&
+                                    inode &&
+                                    !(inode && S_ISDIR(inode->i_mode) &&
+                                      bindex > dstart && bindex < dend))) {
+                               PRINT_CALLER(fname, fxn, line);
+                               pr_debug(" CD2: dentry/lower=%p:%p(%p) "
+                                        "bindex=%d dstart/end=%d:%d\n",
+                                        dentry, lower_dentry,
+                                        (lower_dentry ?
+                                         lower_dentry->d_inode :
+                                         (void *) -1L),
+                                        bindex, dstart, dend);
                        }
                }
        }
@@ -193,22 +192,22 @@ void __unionfs_check_dentry(const struct dentry *dentry,
                                         lower_mnt, bindex, dstart, dend);
                        }
                } else {        /* lower_mnt == NULL */
-                       if (bindex >= dstart && bindex <= dend) {
-                               /*
-                                * Directories can have NULL lower inodes in
-                                * b/t start/end, but NOT if at the
-                                * start/end range.  Ignore this rule,
-                                * however, if this is a NULL dentry.
-                                */
-                               if (unlikely(inode &&
-                                            !(inode && S_ISDIR(inode->i_mode) 
&&
-                                              bindex > dstart && bindex < 
dend))) {
-                                       PRINT_CALLER(fname, fxn, line);
-                                       pr_debug(" CM1: dentry/lmnt=%p:%p "
-                                                "bindex=%d dstart/end=%d:%d\n",
-                                                dentry, lower_mnt, bindex,
-                                                dstart, dend);
-                               }
+                       if (bindex < dstart || bindex > dend)
+                               continue;
+                       /*
+                        * Directories can have NULL lower inodes in b/t
+                        * start/end, but NOT if at the start/end range.
+                        * Ignore this rule, however, if this is a NULL
+                        * dentry.
+                        */
+                       if (unlikely(inode &&
+                                    !(inode && S_ISDIR(inode->i_mode) &&
+                                      bindex > dstart && bindex < dend))) {
+                               PRINT_CALLER(fname, fxn, line);
+                               pr_debug(" CM1: dentry/lmnt=%p:%p "
+                                        "bindex=%d dstart/end=%d:%d\n",
+                                        dentry, lower_mnt, bindex,
+                                        dstart, dend);
                        }
                }
        }
@@ -310,7 +309,8 @@ 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;
@@ -390,8 +390,8 @@ void __unionfs_check_file(const struct file *file,
                        if (unlikely(bindex < fstart || bindex > fend)) {
                                PRINT_CALLER(fname, fxn, line);
                                pr_debug(" CF5: file/lower=%p:%p bindex=%d "
-                                        "fstart/end=%d:%d\n",
-                                        file, lower_file, bindex, fstart, 
fend);
+                                        "fstart/end=%d:%d\n", file,
+                                        lower_file, bindex, fstart, fend);
                        }
                } else {        /* lower_file == NULL */
                        if (bindex >= fstart && bindex <= fend) {
diff --git a/fs/unionfs/dentry.c b/fs/unionfs/dentry.c
index af3de16..54e426c 100644
--- a/fs/unionfs/dentry.c
+++ b/fs/unionfs/dentry.c
@@ -321,7 +321,8 @@ bool __unionfs_d_revalidate_chain(struct dentry *dentry, 
struct nameidata *nd,
         */
        chain = kzalloc(chain_len * sizeof(struct dentry *), GFP_KERNEL);
        if (unlikely(!chain)) {
-               printk(KERN_CRIT "unionfs: no more memory in %s\n", 
__FUNCTION__);
+               printk(KERN_CRIT "unionfs: no more memory in %s\n",
+                      __FUNCTION__);
                goto out;
        }
 
diff --git a/fs/unionfs/dirfops.c b/fs/unionfs/dirfops.c
index 45a1e8a..9cde48f 100644
--- a/fs/unionfs/dirfops.c
+++ b/fs/unionfs/dirfops.c
@@ -240,8 +240,9 @@ static loff_t unionfs_dir_llseek(struct file *file, loff_t 
offset, int origin)
                                else
                                        err = -EINVAL;
                        } else {
-                               rdstate = find_rdstate(file->f_dentry->d_inode,
-                                                      offset);
+                               struct inode *inode;
+                               inode = file->f_dentry->d_inode;
+                               rdstate = find_rdstate(inode, offset);
                                if (rdstate) {
                                        UNIONFS_F(file)->rdstate = rdstate;
                                        err = rdstate->offset;
diff --git a/fs/unionfs/fanout.h b/fs/unionfs/fanout.h
index 99274c2..6c87079 100644
--- a/fs/unionfs/fanout.h
+++ b/fs/unionfs/fanout.h
@@ -315,11 +315,14 @@ static inline void unionfs_copy_attr_times(struct inode 
*upper)
                lower = unionfs_lower_inode_idx(upper, bindex);
                if (!lower)
                        continue; /* not all lower dir objects may exist */
-               if (unlikely(timespec_compare(&upper->i_mtime, &lower->i_mtime) 
< 0))
+               if (unlikely(timespec_compare(&upper->i_mtime,
+                                             &lower->i_mtime) < 0))
                        upper->i_mtime = lower->i_mtime;
-               if (unlikely(timespec_compare(&upper->i_ctime, &lower->i_ctime) 
< 0))
+               if (unlikely(timespec_compare(&upper->i_ctime,
+                                             &lower->i_ctime) < 0))
                        upper->i_ctime = lower->i_ctime;
-               if (unlikely(timespec_compare(&upper->i_atime, &lower->i_atime) 
< 0))
+               if (unlikely(timespec_compare(&upper->i_atime,
+                                             &lower->i_atime) < 0))
                        upper->i_atime = lower->i_atime;
        }
 }
diff --git a/fs/unionfs/sioq.c b/fs/unionfs/sioq.c
index 6e123b5..7deeb76 100644
--- a/fs/unionfs/sioq.c
+++ b/fs/unionfs/sioq.c
@@ -103,7 +103,8 @@ void __delete_whiteouts(void *data)
 {
        struct sioq_args *args = data;
 
-       args->err = do_delete_whiteouts(args->deletewh.dentry, 
args->deletewh.bindex,
+       args->err = do_delete_whiteouts(args->deletewh.dentry,
+                                       args->deletewh.bindex,
                                        args->deletewh.namelist);
        complete(&args->comp);
 }
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to