commit d7689f4af3b4ed4437da8445510c485ac737a81b
Author: Yiannis Pericleous <[EMAIL PROTECTED]>
Date:   Sun Apr 29 21:23:51 2007 -0400

    removed leftover trailing whitespace and uneeded comments as a result of 
rebasing with master

diff --git a/fs/unionfs/dirhelper.c b/fs/unionfs/dirhelper.c
index ebcbcb5..4c31571 100644
--- a/fs/unionfs/dirhelper.c
+++ b/fs/unionfs/dirhelper.c
@@ -74,7 +74,7 @@ static int rmdir_util_callback(void *dirent, const char 
*name, int namelen,
        int err = 0;
        struct unionfs_rmdir_callback *buf = dirent;
        struct dentry *dentry;
-       
+
        buf->filldir_called++;
 
        if (name[0] == '.' &&
@@ -721,9 +721,9 @@ int odf_cache_dir(struct dentry *d_upper, struct dentry 
*d_odf, struct timespec
        struct unionfs_rdutil_callback *buf = NULL;
        int bindex, bstart, bend, bopaque;
        struct iattr attr;
-       
+
        sb = d_upper->d_sb;
-retry: 
+retry:
        unionfs_read_lock(sb);
 
        if ((err = unionfs_partial_lookup(d_upper)))
@@ -732,11 +732,11 @@ retry:
 retry:
        odf_lock(UNIONFS_SB(sb)->odf->odi_ic);
        BUG_ON(!S_ISDIR(d_upper->d_inode->i_mode));
-       
+
        i_odf = d_odf->d_inode;
-       
+
        /* compare mtimes, do not proceed if equal, do not check if retrying 
after -ENOSPC */
-       if (i_odf && i_odf->i_size && !cleaned) { 
+       if (i_odf && i_odf->i_size && !cleaned) {
                if(timespec_compare(&i_odf->i_mtime,mtime) >= 0)
                        goto out;
        }
@@ -862,7 +862,7 @@ out_sb:
  *     b) silly rename if its not physically empty
  *     c) unlink if not a dir
  */
-int check_empty_lower(struct dentry *lower_dentry, struct vfsmount *mnt) 
+int check_empty_lower(struct dentry *lower_dentry, struct vfsmount *mnt)
 {
        struct file *lower_file;
        struct unionfs_rdutil_callback *buf = NULL;
@@ -910,14 +910,14 @@ out:
  *     b) silly rename if its not physically empty
  *     c) unlink if not a dir
  */
-int unionfs_force_rm(struct dentry *dentry, struct dentry **hidden_dentry, int 
bindex) 
+int unionfs_force_rm(struct dentry *dentry, struct dentry **hidden_dentry, int 
bindex)
 {
        struct super_block *sb;
        int err;
 
        sb = dentry->d_sb;
        if (!S_ISDIR((*hidden_dentry)->d_inode->i_mode)) {
-               err = vfs_unlink((*hidden_dentry)->d_parent->d_inode, 
+               err = vfs_unlink((*hidden_dentry)->d_parent->d_inode,
                                                (*hidden_dentry));
                if (err)
                        goto out;
@@ -931,7 +931,7 @@ int unionfs_force_rm(struct dentry *dentry, struct dentry 
**hidden_dentry, int b
 
        if (err == 0)
                err = vfs_rmdir((*hidden_dentry)->d_parent->d_inode, 
*hidden_dentry);
-       
+
        else if (err == -ENOTEMPTY)
                err = unionfs_silly_rename(dentry, *hidden_dentry);
 
@@ -939,7 +939,7 @@ int unionfs_force_rm(struct dentry *dentry, struct dentry 
**hidden_dentry, int b
                goto out;
 
 refresh:
-       *hidden_dentry = lookup_one_len(dentry->d_name.name, 
+       *hidden_dentry = lookup_one_len(dentry->d_name.name,
                                (*hidden_dentry)->d_parent,
                                dentry->d_name.len);
        if (IS_ERR(*hidden_dentry)) {
@@ -961,15 +961,15 @@ out:
  * Cleanup function for the odf cleanup thread.
  * First cleans up the dir caches in odf/ic and then everything
  * in odf/reclaim. It stops once the requested blocks/inodes
- * were freed. 
+ * were freed.
  * size contains the requested amount of inodes/blocks to be freed
  * MULTIPLIED BY 100
- * Modes : 
+ * Modes :
  *     ODF_CLEAN_ALL: cleans all the dir caches and odf/reclaim
  *     ODF_CLEAN_CACHE: cleans all the dir caches
  *     ODF_CLEAN_BLOCKS: clean until size blocks are freed
  *     ODF_CLEAN_INODES: clean until size inodes are freed
- * Returns 1 if it manages to bring inodes/block below requested, 
+ * Returns 1 if it manages to bring inodes/block below requested,
  * threshold and 0 if not.
  */
 int odf_cleanup(struct odf_sb_info *odf, int mode, u64 size)
@@ -1010,14 +1010,14 @@ int odf_cleanup(struct odf_sb_info *odf, int mode, u64 
size)
 
 cleanup_loop:
        /* The cleanup loop pops a dentry off the stack, reads all
-        * its entries, unlinking dir cache files and files in 
+        * its entries, unlinking dir cache files and files in
         * odf/reclaim and pushing to the stack all directories
         */
        while (err >= 0 && stack.n > 0 && !success) {
                dentry = stack.item[--stack.n]; /* pop */
-               
+
                /* we need to dget /reclaim dirs again since we need
-                * them after we close the file 
+                * them after we close the file
                 */
                if (reclaim)
                        dget(dentry);
@@ -1043,7 +1043,7 @@ cleanup_loop:
                        /* remove all directories in odf/reclaim
                         * This assumes that the odf/reclaim dir structure
                         * is entirely flat, ie only odf/reclaim contains
-                        * subdirectories 
+                        * subdirectories
                         */
                        if (dentry != odf->odi_rc->dentry) {
                                blocks = dentry->d_inode->i_blocks;
@@ -1060,8 +1060,8 @@ cleanup_loop:
                        }
                        dput(dentry);
                }
-       
-               /* check if we have reached the threshold */    
+
+               /* check if we have reached the threshold */
                if (mode == ODF_CLEAN_BLOCKS && buf->blocks * 100 >= size)
                        success = 1;
                else if (mode == ODF_CLEAN_INODES && buf->inodes * 100 >= size)
@@ -1070,13 +1070,13 @@ cleanup_loop:
 
        if (err < 0)
                goto out;
-       
+
        if (mode == ODF_CLEAN_CACHE)
-               success = 1;    
+               success = 1;
 
        if (!success) {
                BUG_ON(stack.n);
-               
+
                /* if we did not succeed, clean up odf/reclaim as well */
                if (!reclaim) {
                        reclaim = 1;
@@ -1094,7 +1094,7 @@ out:
        BUG_ON(stack.n < 0);
        while(stack.n)
                dput(stack.item[--stack.n]);
-       
+
        kfree(buf);
        kfree(stack.item);
        if (!err)
diff --git a/fs/unionfs/odf.c b/fs/unionfs/odf.c
index 3e5938c..174e3dc 100644
--- a/fs/unionfs/odf.c
+++ b/fs/unionfs/odf.c
@@ -299,7 +299,7 @@ int odf_is_odf(struct dentry *d_odf)
 {
        struct dentry *magic;
        int err = 0;
-       
+
        if (!d_odf->d_inode) {
                err = -EINVAL;
                goto out;
@@ -854,7 +854,7 @@ int odf_rename(struct dentry *old_dentry, struct dentry 
*new_dentry)
        struct dentry *old_dir, *new_dir;
        struct dentry *old_odfdentry, *new_odfdentry;
        int err = 0;
-       
+
        err = odf_lookup(old_dentry->d_parent, old_dentry, 0);
        if (err)
                goto out;
@@ -874,17 +874,17 @@ int odf_rename(struct dentry *old_dentry, struct dentry 
*new_dentry)
                                new_dentry->d_name.name,
                                new_dir,
                                new_dentry->d_name.len);
-       if (IS_ERR(new_odfdentry)) { 
+       if (IS_ERR(new_odfdentry)) {
                err = PTR_ERR(new_odfdentry);
                goto out;
        }
-       
+
        /* this should never happen */
        BUG_ON(new_odfdentry->d_inode);
-       
+
        lock_rename(old_dir, new_dir);
-       err = vfs_rename(old_dir->d_inode, 
-                       old_odfdentry, new_dir->d_inode, 
+       err = vfs_rename(old_dir->d_inode,
+                       old_odfdentry, new_dir->d_inode,
                        new_odfdentry);
        unlock_rename(old_dir, new_dir);
        dput(new_odfdentry);
@@ -1356,7 +1356,7 @@ struct odf_dentry_info *odf_ic_cache_dentry(struct dentry 
*dir)
        if (!S_ISDIR(dir->d_inode->i_mode))
                return ERR_PTR(-ENOTDIR);
 
-       return odf_ic_dentry(UNIONFS_SB(dir->d_sb)->odf, 
+       return odf_ic_dentry(UNIONFS_SB(dir->d_sb)->odf,
                dir->d_inode->i_ino, ODF_CONTENT, ODF_CONTENT_LEN);
 }
 
@@ -1372,7 +1372,7 @@ struct odf_dentry_info *odf_ic_dentry(struct odf_sb_info 
*osi, u64 ino, char *na
        int i, err = 0;
 
        odi_ic = osi->odi_ic;
-       
+
        for (i = 3; i >= 0; i--) {
                breakdown[i] = ino & 0xFFFF;
                ino >>= 16;
@@ -1397,7 +1397,7 @@ struct odf_dentry_info *odf_ic_dentry(struct odf_sb_info 
*osi, u64 ino, char *na
                        goto out;
                }
        }
-       
+
        odi_ret = odf_lookup_name(osi, odis[3], name, namelen, ODF_LOOKUP_FILE, 
NULL);
        if (IS_ERR(odi_ret)) {
                err = PTR_ERR(odi_ret);
@@ -1408,7 +1408,7 @@ out:
        for (i = 0; i < 4; i++)
                odf_put_info(odis[i]);
 
-       if (err) 
+       if (err)
                return ERR_PTR(err);
 
        return odi_ret;
@@ -1418,7 +1418,7 @@ out:
  * FIXME: Instead of a file we should give the position
  * in the odf
  */
-int odf_write_dirent(struct file *filp, const char *name, int namelen, 
+int odf_write_dirent(struct file *filp, const char *name, int namelen,
                                u64 ino, unsigned int d_type)
 {
        int err = 0;
@@ -1486,7 +1486,7 @@ int odf_read_dirent(struct file *filp, char **name, int 
*namelen,
                err = -EIO;
                goto out;
        }
-       
+
        /* check if we're reading at the correct offset */
        if (le32_to_cpu(le32) != ODF_DIRENT_MAGIC) {
                err = -EFAULT;
@@ -1544,7 +1544,6 @@ out:
 int odf_purge_dir_cache(struct dentry *dentry)
 {
        int err = 0;
-       //struct iattr attr;
        struct odf_dentry_info *odi = NULL;
 
        odi = odf_ic_cache_dentry(dentry);
@@ -1553,15 +1552,7 @@ int odf_purge_dir_cache(struct dentry *dentry)
                odi = NULL;
                goto out;
        }
-       
-       /* truncate */
-/*
-       if (dentry->d_inode) {
-               attr.ia_size = 0;
-               attr.ia_valid = ATTR_SIZE | ATTR_FORCE;
-               err = notify_change(odi->dentry, &attr);
-       }
-*/
+
        err = vfs_unlink(odi->dentry->d_parent->d_inode, odi->dentry);
 out:
        odf_put_info(odi);
@@ -1703,7 +1694,7 @@ int __odf_set_opaque(struct dentry *d, int branch)
  * Checks if a dentry is opaque
  * The dentry version takes a UnionFS dentry, the inode one an ODF inode
  */
-int odf_is_opaque(struct dentry *dentry) 
+int odf_is_opaque(struct dentry *dentry)
 {
        return __odf_is_opaque(UNIONFS_D(dentry)->odf_info->dentry->d_inode);
 }
@@ -1712,14 +1703,14 @@ int odf_is_opaque(struct dentry *dentry)
  * which is not necessarily the same as the branch position, so we need to
  * convert the branch id to the branch position
  */
-int odf_get_opaque(struct super_block *sb, struct dentry *dentry) 
+int odf_get_opaque(struct super_block *sb, struct dentry *dentry)
 {
        int i, opaque;
 
        BUG_ON(!UNIONFS_D(dentry)->odf_info);
 
        opaque = UNIONFS_D(dentry)->odf_info->opaque;
-       
+
        if (opaque == -1)
                return -1;
 
@@ -1747,7 +1738,7 @@ int odf_set_opaque(struct dentry *dentry, int branch)
        return err;
 }
 
-int __odf_set_opaque(struct dentry *d, int branch) 
+int __odf_set_opaque(struct dentry *d, int branch)
 {
        struct iattr ia;
        ia.ia_valid = ATTR_GID;
@@ -1859,7 +1850,7 @@ int odf_update_uuids(struct odf_sb_info *odf, struct path 
*old_paths, int old_br
        }
 
        for (bindex = 0; bindex < new_branches; bindex++) {
-               
+
                m = new_paths[bindex].mnt;
 
                /* check if this fs was in the old uuids */
@@ -1867,7 +1858,7 @@ int odf_update_uuids(struct odf_sb_info *odf, struct path 
*old_paths, int old_br
                        if (m == old_paths[i].mnt)
                                break;
                }
-               
+
                /* if yes, then give it the old uuid */
                if (i != old_branches) {
                        memcpy(new_uuids + bindex * UUID_LEN, old_uuids + i * 
UUID_LEN, UUID_LEN);
diff --git a/fs/unionfs/unlink.c b/fs/unionfs/unlink.c
index 41110ca..852ee59 100644
--- a/fs/unionfs/unlink.c
+++ b/fs/unionfs/unlink.c
@@ -103,7 +103,7 @@ static int unionfs_do_unlink(struct inode *dir, struct 
dentry *dentry)
                hidden_dentry = unionfs_lower_dentry_idx(dentry, bindex);
                if (!hidden_dentry)
                        continue;
-                       
+
                hidden_dir_dentry = lock_parent(hidden_dentry);
 
                /* avoid destroying the hidden inode if the file is in use */
@@ -115,25 +115,25 @@ static int unionfs_do_unlink(struct inode *dir, struct 
dentry *dentry)
                dput(hidden_dentry);
                fsstack_copy_attr_times(dir, hidden_dir_dentry->d_inode);
                unlock_dir(hidden_dir_dentry);
-               
+
                if (err)
                        break;
        }
 
        if (err) {
                if (err == -EIO)
-                       printk(KERN_WARNING 
-                               "unionfs_unlink: IO error unlinking from branch 
%d\n", 
+                       printk(KERN_WARNING
+                               "unionfs_unlink: IO error unlinking from branch 
%d\n",
                                bindex);
                err = odf_create_wh(dentry);
                if (err)
                        goto out;
        }
-       
+
        /* we want to update mtime here, since if the file to
         * be removed was only on a rd only branch, then since
         * the mtime of that branch has not changed, so the
-        * mtime of the upper file is not updated 
+        * mtime of the upper file is not updated
         */
        odf_purge_dir_cache(dentry->d_parent);
        attr.ia_mtime = current_kernel_time();
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to