commit dc6b1d6bbb414d1a00e3eb56f9de788a54ac6c18
Author: Yiannis Pericleous <[EMAIL PROTECTED]>
Date: Mon Apr 23 14:27:07 2007 -0400
cleanup trailing whitespace
diff --git a/fs/unionfs/commonfops.c b/fs/unionfs/commonfops.c
index 15d3ce8..41ad0ca 100644
--- a/fs/unionfs/commonfops.c
+++ b/fs/unionfs/commonfops.c
@@ -126,7 +126,7 @@ int unionfs_silly_rename(struct dentry *dentry, struct
dentry *hidden_dentry)
struct dentry *hidden_old_dir_dentry;
struct dentry *hidden_new_dir_dentry;
struct odf_dentry_info *odi = NULL;
-
+
sprintf(name, ".unionfs%*.*lx",
i_inosize, i_inosize, hidden_dentry->d_inode->i_ino);
@@ -163,12 +163,12 @@ int unionfs_silly_rename(struct dentry *dentry, struct
dentry *hidden_dentry)
dput(hidden_old_dir_dentry);
dput(hidden_new_dir_dentry);
dput(hidden_dentry);
-
+
if (err)
goto out;
-
+
/* create a whiteout */
- odi = odf_lookup_name(UNIONFS_SB(dentry->d_sb)->odf,
+ odi = odf_lookup_name(UNIONFS_SB(dentry->d_sb)->odf,
UNIONFS_D(dentry->d_parent)->odf_info,
name, strlen(name), ODF_LOOKUP_WH, odi);
BUG_ON(IS_ERR(odi) || odi == NULL);
@@ -366,7 +366,7 @@ int unionfs_file_revalidate(struct file *file, int
willwrite)
err = -ESTALE;
goto out_nofree;
}
-
+
sbgen = atomic_read(&UNIONFS_SB(sb)->generation);
dgen = atomic_read(&UNIONFS_D(dentry)->generation);
fgen = atomic_read(&UNIONFS_F(file)->generation);
@@ -477,7 +477,7 @@ static int __open_dir(struct inode *inode, struct file
*file)
branchget(inode->i_sb, bindex);
unionfs_read_unlock(inode->i_sb);
}
-
+
odi = odf_ic_cache_dentry(file->f_dentry);
if (IS_ERR(odi))
return PTR_ERR(odi);
diff --git a/fs/unionfs/config.c b/fs/unionfs/config.c
index b59dbec..14ac111 100644
--- a/fs/unionfs/config.c
+++ b/fs/unionfs/config.c
@@ -85,20 +85,20 @@ static ssize_t unionfs_read_help(struct unionfs_config_attr
*attr, char *page)
return sprintf(page, "\n"
TIMEOUT ": " TIMEOUT_INFO "\n\n"
THRESH_BH ": " THRESH_BH_INFO "\n\n"
- THRESH_BL ": " THRESH_BL_INFO "\n\n"
+ THRESH_BL ": " THRESH_BL_INFO "\n\n"
THRESH_IH ": " THRESH_IH_INFO "\n\n"
THRESH_IL ": " THRESH_IL_INFO "\n\n",
- TIMEOUT_DEF, THRESH_BH_DEF, THRESH_BL_DEF,
+ TIMEOUT_DEF, THRESH_BH_DEF, THRESH_BL_DEF,
THRESH_IH_DEF, THRESH_IL_DEF
);
}
/* writes numbers within a range */
-static ssize_t unionfs_write_num(struct unionfs_config_attr *attr,
+static ssize_t unionfs_write_num(struct unionfs_config_attr *attr,
const char *page, size_t count)
{
unsigned long tmp;
- char *p = (char *) page;
+ char *p = (char *) page;
tmp = simple_strtoul(p, &p, 10);
if (!p || (*p && (*p != '\n')))
@@ -214,8 +214,8 @@ static struct configfs_attribute *unionfs_global_attrs[] = {
/* only allow show and store, no group/item creation */
static struct configfs_item_operations unionfs_global_item_ops = {
- .show_attribute = unionfs_attr_show,
- .store_attribute = unionfs_attr_store,
+ .show_attribute = unionfs_attr_show,
+ .store_attribute = unionfs_attr_store,
};
static struct config_item_type unionfs_global_type = {
diff --git a/fs/unionfs/dirfops.c b/fs/unionfs/dirfops.c
index 9dadc51..1a8b279 100644
--- a/fs/unionfs/dirfops.c
+++ b/fs/unionfs/dirfops.c
@@ -24,7 +24,7 @@ static int unionfs_readdir(struct file *file, void *dirent,
filldir_t filldir)
struct file *odf_file = NULL;
struct inode *inode = NULL;
struct odf_dentry_info *odi = NULL;
- loff_t size;
+ loff_t size;
/* dirent */
u64 ino;
char *name = NULL;
@@ -46,7 +46,7 @@ static int unionfs_readdir(struct file *file, void *dirent,
filldir_t filldir)
goto out;
}
- /* check if cached dir does not exist */
+ /* check if cached dir does not exist */
if (!odi->dentry->d_inode || !odi->dentry->d_inode->i_size) {
/* odf cache dir calls partial lookup wich expects a locked
dentry */
@@ -83,7 +83,7 @@ static int unionfs_readdir(struct file *file, void *dirent,
filldir_t filldir)
goto out;
odf_file->f_pos = file->f_pos;
-
+
/* read the next dirent */
err = odf_read_dirent(odf_file, &name, &namelen, &ino, &d_type);
if (err)
diff --git a/fs/unionfs/dirhelper.c b/fs/unionfs/dirhelper.c
index f839e11..7fa2279 100644
--- a/fs/unionfs/dirhelper.c
+++ b/fs/unionfs/dirhelper.c
@@ -102,7 +102,7 @@ static int cleanup_util_callback(void *dirent, const char
*name, int namelen,
struct dentry *dentry;
loff_t bytes, size;
int blocks;
-
+
buf->filldir_called++;
if (name[0] == '.' &&
@@ -111,9 +111,9 @@ static int cleanup_util_callback(void *dirent, const char
*name, int namelen,
/* remove dir cache files or all if files if cleaning /reclaim */
if ((d_type == DT_REG && buf->reclaim) ||
- (namelen == ODF_CONTENT_LEN &&
+ (namelen == ODF_CONTENT_LEN &&
!strncmp(name, ODF_CONTENT, namelen))) {
-
+
dentry = lookup_one_len(name, buf->dir, namelen);
/* calculate the blocks to be freed */
@@ -130,7 +130,7 @@ static int cleanup_util_callback(void *dirent, const char
*name, int namelen,
if (IS_ERR(dentry)) {
err = PTR_ERR(dentry);
goto out;
- }
+ }
BUG_ON(!dentry->d_inode);
BUG_ON(d_type != DT_REG);
err = vfs_unlink(buf->dir->d_inode, dentry);
@@ -166,7 +166,7 @@ static int readdir_util_callback(void *dirent, const char
*name, int namelen,
int whiteout = 0;
struct filldir_node *found;
struct odf_dentry_info *odi = NULL;
-
+
if (buf->mode == RD_CHECK_EMPTY || buf->mode == RD_CHECK_HD_EMPTY)
buf->filldir_called = 1;
else
@@ -179,16 +179,16 @@ static int readdir_util_callback(void *dirent, const char
*name, int namelen,
else
goto find;
}
-
+
/* we dont care about odf when checking hidden dirs */
if (buf->mode == RD_CHECK_HD_EMPTY) {
err = -ENOTEMPTY;
goto out;
}
-
+
/* check odf */
odi = odf_lookup_name(UNIONFS_SB(buf->dir->d_sb)->odf,
- UNIONFS_D(buf->dir)->odf_info,
+ UNIONFS_D(buf->dir)->odf_info,
name, namelen, ODF_LOOKUP_LOCKED, NULL);
if (IS_ERR(odi)){
odi = NULL;
@@ -332,7 +332,7 @@ int odf_cache_dir(struct dentry *d_upper, struct dentry
*d_odf, struct timespec
int bindex, bstart, bend, bopaque;
int cleaned = 0;
struct iattr attr;
-
+
sb = d_upper->d_sb;
unionfs_read_lock(sb);
@@ -342,11 +342,11 @@ int odf_cache_dir(struct dentry *d_upper, struct dentry
*d_odf, struct timespec
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;
}
@@ -470,7 +470,7 @@ out_sb:
/* Checks if the given directory is physically empty
* Returns 0 if it is empty and -ENOTEMPTY if not
*/
-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;
@@ -518,14 +518,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;
@@ -539,7 +539,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);
@@ -547,7 +547,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)) {
@@ -569,15 +569,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)
@@ -618,14 +618,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);
@@ -651,7 +651,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;
@@ -668,8 +668,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)
@@ -678,13 +678,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;
@@ -702,7 +702,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/inode.c b/fs/unionfs/inode.c
index 799884d..1e984cb 100644
--- a/fs/unionfs/inode.c
+++ b/fs/unionfs/inode.c
@@ -91,10 +91,10 @@ static int unionfs_create(struct inode *parent, struct
dentry *dentry,
unlock_dir(hidden_parent_dentry);
else {
- err = odf_lookup(dentry->d_parent, dentry,
+ err = odf_lookup(dentry->d_parent, dentry,
ODF_LOOKUP_FILE|ODF_LOOKUP_RMV_WH);
if (!err)
- err = odf_purge_dir_cache(dentry->d_parent);
+ err = odf_purge_dir_cache(dentry->d_parent);
if (!err)
err = unionfs_interpose(dentry, parent->i_sb, 0);
if (!err) {
@@ -161,7 +161,7 @@ static int unionfs_link(struct dentry *old_dentry, struct
inode *dir,
if (dbstart(old_dentry) > dbstart(new_dentry)) {
/* dont copyup if new_dentry doesn't exist in union */
- if (dbstart(new_dentry) == 0 &&
+ if (dbstart(new_dentry) == 0 &&
dbstart(new_dentry) == dbend(new_dentry) &&
(!unionfs_lower_dentry_idx(new_dentry, 0) ||
!unionfs_lower_dentry_idx(new_dentry, 0)->d_inode)) {
@@ -192,7 +192,7 @@ static int unionfs_link(struct dentry *old_dentry, struct
inode *dir,
if (err)
goto out;
}
-
+
BUG_ON(dbstart(old_dentry) != dbstart(new_dentry));
hidden_dir_dentry = lock_parent(hidden_new_dentry);
if (!(err = is_robranch(old_dentry)))
@@ -213,9 +213,9 @@ docopyup:
hidden_new_dentry =
create_parents(dir, new_dentry, bindex);
hidden_old_dentry = unionfs_lower_dentry(old_dentry);
- if (hidden_new_dentry->d_inode &&
+ if (hidden_new_dentry->d_inode &&
UNIONFS_D(new_dentry)->odf_info->whiteout) {
- err = unionfs_force_rm(new_dentry,
+ err = unionfs_force_rm(new_dentry,
&hidden_new_dentry,
dbstart(old_dentry));
if (err)
@@ -246,7 +246,7 @@ check_link:
fsstack_copy_inode_size(dir, hidden_new_dentry->d_parent->d_inode);
/* update odf, FIXME: what to do in case of err? */
err = odf_link(old_dentry, new_dentry);
- err = odf_purge_dir_cache(new_dentry->d_parent);
+ err = odf_purge_dir_cache(new_dentry->d_parent);
/* propagate number of hard-links */
old_dentry->d_inode->i_nlink = unionfs_get_nlinks(old_dentry->d_inode);
@@ -304,7 +304,7 @@ static int unionfs_symlink(struct inode *dir, struct dentry
*dentry,
if (err)
goto out;
}
-
+
hidden_dir_dentry = lock_parent(hidden_dentry);
if (!(err = is_robranch_super(dentry->d_sb, bstart))) {
@@ -317,12 +317,12 @@ static int unionfs_symlink(struct inode *dir, struct
dentry *dentry,
if (!(err || !hidden_dentry->d_inode)) {
/* update odf and remove any wh before interpose*/
- err = odf_lookup(dentry->d_parent, dentry,
+ err = odf_lookup(dentry->d_parent, dentry,
ODF_LOOKUP_FILE|ODF_LOOKUP_RMV_WH);
if (!err)
err = unionfs_interpose(dentry, dir->i_sb, 0);
if (!err)
- err = odf_purge_dir_cache(dentry->d_parent);
+ err = odf_purge_dir_cache(dentry->d_parent);
if (!err) {
fsstack_copy_attr_times(dir,
hidden_dir_dentry->d_inode);
@@ -377,7 +377,7 @@ static int unionfs_mkdir(struct inode *parent, struct
dentry *dentry, int mode)
if (err)
goto out;
}
-
+
hidden_parent_dentry = lock_parent(hidden_dentry);
if (IS_ERR(hidden_parent_dentry)) {
@@ -392,10 +392,10 @@ static int unionfs_mkdir(struct inode *parent, struct
dentry *dentry, int mode)
/* did the mkdir suceed? */
if (err)
goto out;
-
+
/* update number of links on parent directory */
parent->i_nlink = unionfs_get_nlinks(parent);
-
+
for (i = bindex + 1; i < bend; i++) {
if (unionfs_lower_dentry_idx(dentry, i)) {
dput(unionfs_lower_dentry_idx(dentry, i));
@@ -423,7 +423,7 @@ static int unionfs_mkdir(struct inode *parent, struct
dentry *dentry, int mode)
/* update number of links on parent directory */
parent->i_nlink = unionfs_get_nlinks(parent);
}
-
+
out:
if (!dentry->d_inode)
d_drop(dentry);
@@ -462,7 +462,7 @@ static int unionfs_mknod(struct inode *dir, struct dentry
*dentry, int mode,
goto out;
}
}
-
+
if (hidden_dentry->d_inode && UNIONFS_D(dentry)->odf_info->whiteout) {
err = unionfs_force_rm(dentry, &hidden_dentry, bstart);
if (err)
@@ -484,10 +484,10 @@ static int unionfs_mknod(struct inode *dir, struct dentry
*dentry, int mode,
}
/* update odf and remove any wh before interpose*/
- err = odf_lookup(dentry->d_parent, dentry,
+ err = odf_lookup(dentry->d_parent, dentry,
ODF_LOOKUP_FILE|ODF_LOOKUP_RMV_WH);
if (!err)
- err = odf_purge_dir_cache(dentry->d_parent);
+ err = odf_purge_dir_cache(dentry->d_parent);
if (!err)
err = unionfs_interpose(dentry, dir->i_sb, 0);
if (!err) {
diff --git a/fs/unionfs/lookup.c b/fs/unionfs/lookup.c
index 95311c7..f8adf89 100644
--- a/fs/unionfs/lookup.c
+++ b/fs/unionfs/lookup.c
@@ -38,7 +38,7 @@ struct dentry *unionfs_lookup_backend(struct dentry *dentry,
struct nameidata *n
const char *name;
int namelen;
struct nameidata new_nd;
-
+
/* We should already have a lock on this dentry in the case of a
* partial lookup, or a revalidation. Otherwise it is returned from
* new_dentry_private_data already locked.
@@ -77,11 +77,11 @@ struct dentry *unionfs_lookup_backend(struct dentry
*dentry, struct nameidata *n
err = odf_lookup(dentry->d_parent, dentry, 0);
if (err)
goto out;
-
+
/* return negative dentry if a whiteout */
- if (UNIONFS_D(dentry)->odf_info &&
+ if (UNIONFS_D(dentry)->odf_info &&
UNIONFS_D(dentry)->odf_info->whiteout){
- bindex = 0;
+ bindex = 0;
goto out_negative;
}
}
@@ -91,8 +91,8 @@ struct dentry *unionfs_lookup_backend(struct dentry *dentry,
struct nameidata *n
bend = dbend(parent_dentry);
bopaque = odf_get_opaque(parent_dentry->d_sb, parent_dentry);
BUG_ON(bstart < 0);
-
- if (nd == NULL){
+
+ if (nd == NULL){
memset(&new_nd, 0, sizeof(struct nameidata));
nd = &new_nd;
}
@@ -342,7 +342,7 @@ int unionfs_partial_lookup(struct dentry *dentry)
return err;
BUG_ON(!UNIONFS_D(dentry)->odf_info);
}
-
+
}
return 0;
}
diff --git a/fs/unionfs/main.c b/fs/unionfs/main.c
index 72d42d1..865ecd9 100644
--- a/fs/unionfs/main.c
+++ b/fs/unionfs/main.c
@@ -82,7 +82,7 @@ int unionfs_interpose(struct dentry *dentry, struct
super_block *sb, int flag)
if (!UNIONFS_D(dentry)->odf_info)
err = odf_lookup(dentry->d_parent, dentry, odf_flag);
if (err){
- printk("unionfs_interpose: odf failed to create dentry:
%s, %d\n",
+ printk("unionfs_interpose: odf failed to create dentry:
%s, %d\n",
dentry->d_name.name, err);
goto out;
}
@@ -90,7 +90,7 @@ int unionfs_interpose(struct dentry *dentry, struct
super_block *sb, int flag)
if (UNIONFS_D(dentry)->odf_info->whiteout){
err = -ENOENT;
goto out;
- }
+ }
opaque = odf_get_opaque(sb, dentry);
if (opaque >= 0)
set_dbend(dentry, opaque);
@@ -443,7 +443,7 @@ static struct unionfs_dentry_info *unionfs_parse_options(
optarg = strchr(optname, '=');
if (optarg)
*optarg++ = '\0';
-
+
/* taken care of in odf_parse_options */
if (!strcmp("odfforce", optname))
continue;
@@ -474,7 +474,7 @@ static struct unionfs_dentry_info *unionfs_parse_options(
/* taken care of in odf_parse_options */
if (!strcmp("odf", optname))
continue;
-
+
/* All of these options require an integer argument. */
intval = simple_strtoul(optarg, &endptr, 0);
if (*endptr) {
@@ -626,7 +626,7 @@ static int unionfs_read_super(struct super_block *sb, void
*raw_data,
goto out_free;
}
- /* if odf is new, save branch conf */
+ /* if odf is new, save branch conf */
if (odf_is_new(odf)) {
/* generate new uuids */
@@ -683,7 +683,7 @@ static int unionfs_read_super(struct super_block *sb, void
*raw_data,
err = -ENOMEM;
goto out_dput;
}
-
+
/* link the upper and lower dentries */
sb->s_root->d_fsdata = NULL;
if ((err = new_dentry_private_data(sb->s_root)))
@@ -702,11 +702,11 @@ static int unionfs_read_super(struct super_block *sb,
void *raw_data,
}
set_dbstart(sb->s_root, bstart);
set_dbend(sb->s_root, bend);
-
+
/* save odf root dentry */
UNIONFS_D(sb->s_root)->odf_info = UNIONFS_SB(sb)->odf->odi_ns;
put_ns = 0;
-
+
/* Set the generation number to one, since this is for the mount. */
atomic_set(&UNIONFS_D(sb->s_root)->generation, 1);
@@ -749,7 +749,7 @@ out_dput:
out_free:
if (UNIONFS_SB(sb)->odf) {
- /* cleanup thread is not started,free it here so
+ /* cleanup thread is not started,free it here so
* odf_put_super doesnt wait for it */
kfree(UNIONFS_SB(sb)->odf->cleanup);
UNIONFS_SB(sb)->odf->cleanup = NULL;
diff --git a/fs/unionfs/odf.c b/fs/unionfs/odf.c
index b31f377..a3cc6c8 100644
--- a/fs/unionfs/odf.c
+++ b/fs/unionfs/odf.c
@@ -84,15 +84,15 @@ struct odf_sb_info* odf_read_super(char *options)
char *odffile = NULL;
struct sioa_args *sioa;
int err, odfforce;
-
+
odfforce = odf_parse_options(options, &odffile);
if (odfforce < 0) {
err = odfforce;
goto out;
}
-
- err = path_lookup(odffile, LOOKUP_FOLLOW, &nd);
- if (err) {
+
+ err = path_lookup(odffile, LOOKUP_FOLLOW, &nd);
+ if (err) {
printk(KERN_WARNING "unionfs: Cannot access odf\n");
goto out;
}
@@ -122,7 +122,7 @@ struct odf_sb_info* odf_read_super(char *options)
goto out_free;
}
- if (odf_is_new(osi)) {
+ if (odf_is_new(osi)) {
/* if this odf is fresh, create the hierarchy */
err = __odf_create_hierarchy(nd.dentry);
if (err)
@@ -221,7 +221,7 @@ struct odf_dentry_info* odf_getpath(struct dentry *d_odf,
struct odf_sb_info *os
{
struct dentry *dentry;
struct odf_dentry_info* odi = NULL;
-
+
dentry = lookup_one_len(name, d_odf, strlen(name));
if (IS_ERR(dentry) || !dentry) {
odi = ERR_PTR(-EINVAL);
@@ -337,17 +337,17 @@ int odf_parse_options(char *options, char **odf_path)
odf_dentry = UNIONFS_D(dentry)->odf_info->dentry;
odi = UNIONFS_SB(dentry->d_sb)->odf->odi_rc;
-
+
new_name = kzalloc(ODF_INAME_LEN, GFP_KERNEL);
if (!new_name){
err = -ENOMEM;
goto out;
}
- sprintf(new_name, "%lu", odf_dentry->d_inode->i_ino);
+ sprintf(new_name, "%lu", odf_dentry->d_inode->i_ino);
/* lock new dir, the old dir should already be locked */
odf_lock(odi);
-
+
old_dentry = odf_dentry;
old_dir = odf_dentry->d_parent->d_inode;
new_dir = odi->dentry->d_inode;
@@ -356,13 +356,13 @@ int odf_parse_options(char *options, char **odf_path)
err = PTR_ERR(new_dentry);
goto out_unlock;
}
-
+
/* this should never happen */
BUG_ON(new_dentry->d_inode);
-
+
lock_rename(old_dentry->d_parent, new_dentry->d_parent);
err = vfs_rename(old_dir, old_dentry, new_dir, new_dentry);
- unlock_rename(old_dentry->d_parent, new_dentry->d_parent);
+ unlock_rename(old_dentry->d_parent, new_dentry->d_parent);
dput(new_dentry);
out_unlock:
@@ -383,13 +383,13 @@ 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;
if (UNIONFS_D(old_dentry)->odf_info == NULL) {
- printk("rename attempt %s to %s not in odf\n",
+ printk("rename attempt %s to %s not in odf\n",
old_dentry->d_name.name,
new_dentry->d_name.name);
goto out;
@@ -412,17 +412,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_unlock;
}
-
+
/* 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);
@@ -454,7 +454,7 @@ int odf_link(struct dentry *old_dentry, struct dentry
*new_dentry)
if (UNIONFS_D(new_dentry)->odf_info){
err = odf_remove(new_dentry, ODF_RMV_ANY);
}
-
+
odf_lock(UNIONFS_D(old_dentry)->odf_info);
odf_lock(UNIONFS_D(new_dentry->d_parent)->odf_info);
old_odfdentry = UNIONFS_D(old_dentry)->odf_info->dentry;
@@ -464,16 +464,16 @@ int odf_link(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_unlock;
}
-
+
/* this should never happen */
BUG_ON(new_odfdentry->d_inode);
-
+
err = vfs_link(old_odfdentry, old_dir->d_inode, new_odfdentry);
-
+
dput(new_odfdentry);
out_unlock:
odf_unlock(UNIONFS_D(old_dentry)->odf_info);
@@ -499,10 +499,10 @@ struct dentry *__link_add_dirent(struct file *link_file,
struct dentry *dentry)
oldfs = get_fs();
set_fs(KERNEL_DS);
-
+
size = i_size_read(link_file->f_dentry->d_inode);
-
+
if (size == 0) {
/* file is new, fill in copyup info with 0's */
link_file->f_pos = 0;
@@ -521,12 +521,12 @@ struct dentry *__link_add_dirent(struct file *link_file,
struct dentry *dentry)
err = -EIO;
goto out;
}
- }
+ }
else {
/* check if our dirent is already in the file */
link_file->f_pos = sizeof(__le32) + sizeof(__le64);
-
+
while (link_file->f_pos < size) {
err = link_file->f_op->read(link_file, (char*)&le32,
@@ -557,7 +557,7 @@ struct dentry *__link_add_dirent(struct file *link_file,
struct dentry *dentry)
goto out;
}
ino = le64_to_cpu(le64);
-
+
/* check if this is our dirent */
if (ino == dentry->d_parent->d_inode->i_ino &&
dentry->d_name.len == len &&
@@ -601,7 +601,7 @@ out:
return NULL;
}
-/*
+/*
* Update the original inode's copyup info in the link file, and then for each
entry
* in the file, create parent hierarchies in the copied up branch and link to
the new_dentry
*/
@@ -616,12 +616,12 @@ int odf_copyup_link(struct super_block *sb, struct dentry
*old_dentry, struct de
int err = 0;
__le64 le64;
__le32 le32;
-
+
BUG_ON(S_ISDIR(old_dentry->d_inode->i_mode));
/* do nothing if this has no links? or should we actually check if it
has a link file? */
if (old_dentry->d_inode->i_nlink <= 1)
return 0;
-
+
name = kmalloc(UUID_LEN * 2 + 1,GFP_KERNEL);
if (!name) {
err = -ENOMEM;
@@ -652,14 +652,14 @@ int odf_copyup_link(struct super_block *sb, struct dentry
*old_dentry, struct de
mntput(osi->mnt);
goto out;
}
-
+
oldfs = get_fs();
set_fs(KERNEL_DS);
/* get the odf ino first */
link_file->f_pos = 0;
- /* write destination branch id*/
+ /* write destination branch id*/
le32 = cpu_to_le32(branch_id(sb, new_branch));
err = link_file->f_op->write(link_file, (char*)&le32,
sizeof(__le32), &link_file->f_pos);
@@ -678,15 +678,15 @@ int odf_copyup_link(struct super_block *sb, struct dentry
*old_dentry, struct de
set_fs(oldfs);
goto out;
}
-
+
set_fs(oldfs);
- err = 0;
+ err = 0;
odf_put_info(links);
links = NULL;
filp_close(link_file, NULL);
link_file = NULL;
- /* XXX: create parent hierarchies in new_branch for all other links
+ /* XXX: create parent hierarchies in new_branch for all other links
* and link to the new_dentry
*/
@@ -756,7 +756,7 @@ skip:
/* case 0:
* - dest branch id has changed because of remounts
- * - do not copyup, remove copyup info from link info file
+ * - do not copyup, remove copyup info from link info file
*/
if (branch_dst == -1) {
oldfs = get_fs();
@@ -780,7 +780,7 @@ skip:
err = -EIO;
goto out_unlock;
}
-
+
set_fs(oldfs);
err = 0;
}
@@ -805,7 +805,7 @@ skip:
err = PTR_ERR(lower_dentry);
goto out_unlock;
}
- /* now link */
+ /* now link */
}
/* case 2:
@@ -909,7 +909,7 @@ out:
* - ODF_LOOKUP_LOCKED: dont lock parent and ic (already locked from
caller)
*/
int odf_lookup(struct dentry *parent, struct dentry *dentry, int flags)
-{
+{
struct odf_sb_info *osi = UNIONFS_SB(dentry->d_sb)->odf;
struct odf_dentry_info *links = NULL;
struct dentry *lower_dentry = NULL;
@@ -925,7 +925,7 @@ int odf_lookup(struct dentry *parent, struct dentry
*dentry, int flags)
break;
}
}
- else {
+ else {
lower_dentry = unionfs_lower_dentry(dentry);
bstart = dbstart(dentry);
}
@@ -942,7 +942,7 @@ int odf_lookup(struct dentry *parent, struct dentry
*dentry, int flags)
*(unsigned int *) uuid + 4,
*(unsigned int *) uuid + 8,
*(unsigned int *) uuid + 12);
- links = odf_ic_dentry(osi, lower_dentry->d_inode->i_ino,
+ links = odf_ic_dentry(osi, lower_dentry->d_inode->i_ino,
name, strlen(name));
kfree(name);
if (IS_ERR(links)) {
@@ -965,7 +965,7 @@ int odf_lookup(struct dentry *parent, struct dentry
*dentry, int flags)
/* check if link was copied up and act appropriately */
- /* XXX: Leave this out until Jeff's modifications to
path_lookup
+ /* XXX: Leave this out until Jeff's modifications to path_lookup
__check_link_copyup(link_file, dentry, bstart);
__link_add_dirent(link_file, dentry);
flags |= ODF_LOOKUP_LINK;
@@ -998,7 +998,7 @@ out:
struct odf_dentry_info *__odf_lookup(struct odf_sb_info *osi,
struct odf_dentry_info *parent,
const char *name, int len, int flags,
- struct odf_dentry_info *old_odi,
+ struct odf_dentry_info *old_odi,
struct dentry *link)
{
struct dentry *odf_dentry;
@@ -1007,20 +1007,20 @@ struct odf_dentry_info *__odf_lookup(struct odf_sb_info
*osi,
int opaque, err = 0, cleaned = 0;
uid_t olduid;
gid_t oldgid;
-
+
BUG_ON((flags & ODF_LOOKUP_FILE) && (flags & ODF_LOOKUP_DIR));
BUG_ON((flags & ODF_LOOKUP_WH) && (flags != ODF_LOOKUP_WH));
BUG_ON((flags & ODF_LOOKUP_LINK) && (flags & ODF_LOOKUP_DIR));
odf_dentry = lookup_one_len(name, parent->dentry, len);
-
+
if (IS_ERR(odf_dentry)) {
printk("odf_lookup: failed to lookup %s\n", name);
odf_put_info(old_odi);
odi = (struct odf_dentry_info *)odf_dentry;
goto out;
- }
-
+ }
+
/* if create flags are set, remove existing whiteout */
if (odf_dentry->d_inode && (flags & ODF_LOOKUP_RMV_WH)) {
if (__odf_is_wh(osi, odf_dentry)){
@@ -1029,14 +1029,14 @@ struct odf_dentry_info *__odf_lookup(struct odf_sb_info
*osi,
odf_dentry = lookup_one_len(name, parent->dentry, len);
}
}
-
+
/* we should not lookup_wh if a non-wh entry exists */
if (flags & ODF_LOOKUP_WH)
BUG_ON(odf_dentry->d_inode && !__odf_is_wh(osi, odf_dentry));
/* create inode in odf if dont exist */
if (!odf_dentry->d_inode) {
-
+
if (name[0]=='.')
BUG_ON(len==1 || (name[1]=='.'&&len==2));
retry:
@@ -1095,7 +1095,7 @@ retry:
if (err) {
if (err == -ENOSPC && !cleaned) {
- /* let the cleanup thread do its work and retry
once */
+ /* let the cleanup thread do its work and retry
once */
if (flags & ODF_LOOKUP_LOCKED)
odf_unlock(osi->odi_ic);
cleaned = 1;
@@ -1105,7 +1105,7 @@ retry:
printk(KERN_WARNING "odf_lookup: could not create odf
dentry %s, %d\n", name, err);
dput(odf_dentry);
odf_put_info(old_odi);
- odi = ERR_PTR(err);
+ odi = ERR_PTR(err);
goto out;
}
@@ -1139,7 +1139,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);
}
@@ -1155,7 +1155,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;
@@ -1180,7 +1180,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);
@@ -1191,7 +1191,7 @@ out:
for (i = 0; i < 4; i++)
odf_put_info(odis[i]);
- if (err)
+ if (err)
return ERR_PTR(err);
return odi_ret;
@@ -1201,7 +1201,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;
@@ -1269,7 +1269,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;
@@ -1336,7 +1336,7 @@ int odf_purge_dir_cache(struct dentry *dentry)
odi = NULL;
goto out;
}
-
+
/* truncate */
/*
if (dentry->d_inode) {
@@ -1589,7 +1589,7 @@ int odf_create_wh(struct dentry *dentry)
if (UNIONFS_D(dentry)->odf_info) {
odf_dentry = UNIONFS_D(dentry)->odf_info->dentry;
if (__odf_is_wh(UNIONFS_D(dentry)->odf_info->osi, odf_dentry))
- goto out; /* nothing to be done */
+ goto out; /* nothing to be done */
/* remove entry if existed */
err = odf_remove(dentry, ODF_RMV_ANY);
if (err)
@@ -1641,14 +1641,14 @@ int odf_remove(struct dentry *dentry, int flags)
}
if (!rmv)
goto out;
-
+
odf_dir = UNIONFS_D(dentry->d_parent)->odf_info;
odf_lock(odf_dir);
/* remove */
if (S_ISDIR(odi->dentry->d_inode->i_mode))
err = odf_reclaim(dentry);
- else
+ else
err = vfs_unlink(odi->dentry->d_parent->d_inode, odi->dentry);
if (err)
goto out_unlock;
@@ -1666,14 +1666,14 @@ out:
* 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;
@@ -1701,7 +1701,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;
@@ -1765,8 +1765,8 @@ int __odf_set_opaque(struct dentry *d, int branch)
return notify_change(d, &ia);
}
-/*
- * checks if the /odf/sb file exists
+/*
+ * checks if the /odf/sb file exists
*/
int odf_is_new(struct odf_sb_info *osi)
{
@@ -1796,7 +1796,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 */
@@ -1804,7 +1804,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);
@@ -1961,7 +1961,7 @@ int odf_write_sb_data(struct odf_sb_info* osi, struct
unionfs_data *data, struct
goto out;
}
file->f_pos = 0;
-
+
oldfs = get_fs();
set_fs(KERNEL_DS);
@@ -1992,7 +1992,7 @@ int odf_write_sb_data(struct odf_sb_info* osi, struct
unionfs_data *data, struct
memset(branch_path, 0, ODF_BRANCH_PATH);
name = d_path(d, m, branch_path, ODF_BRANCH_PATH);
len = strlen(name);
-
+
/* write branch ids */
le32 = cpu_to_le32(data[bindex].branch_id);
err = file->f_op->write(file, (char*)&le32, sizeof(__le32),
&file->f_pos);
@@ -2002,7 +2002,7 @@ int odf_write_sb_data(struct odf_sb_info* osi, struct
unionfs_data *data, struct
}
/* path length */
- le32 = cpu_to_le32(len);
+ le32 = cpu_to_le32(len);
err = file->f_op->write(file, (char*)&le32, sizeof(__le32),
&file->f_pos);
if (err != sizeof(__le32)) {
err = -EIO;
@@ -2043,7 +2043,7 @@ out:
return err;
}
-/*
+/*
* Reads the odf sb data and returns the dirs= part of the mount options
* and the bids for each branch
*/
@@ -2101,7 +2101,7 @@ char *odf_read_sb_data(struct odf_sb_info *odf_sb, int
**bid)
goto out_close;
}
version = le32_to_cpu(le32);
-
+
/* check version - dont allow greater than current */
if (((version >> 16) > ODF_VERSION_MAJOR) ||
(((version >> 16) == ODF_VERSION_MAJOR) &&
@@ -2117,7 +2117,7 @@ char *odf_read_sb_data(struct odf_sb_info *odf_sb, int
**bid)
goto out_close;
}
count = le32_to_cpu(le32);
-
+
if (count <= 0) {
printk(KERN_WARNING "unionfs: odf branch count = %d\n", count);
goto out_close;
@@ -2206,12 +2206,12 @@ out:
kfree(branch_entry);
return options;
}
-/*
- * Allocates an odi and fills it with inode and dentry
+/*
+ * Allocates an odi and fills it with inode and dentry
*/
struct odf_dentry_info *odf_alloc_info(struct odf_sb_info *osi, struct dentry
*odf_dentry)
{
- struct odf_dentry_info *odi =
+ struct odf_dentry_info *odi =
kzalloc(sizeof(struct odf_dentry_info),GFP_KERNEL);
odi->whiteout = __odf_is_wh(osi, odf_dentry);
odi->opaque = __odf_get_opaque(odf_dentry->d_inode);
@@ -2236,8 +2236,8 @@ struct odf_dentry_info *odf_fill_info(struct
odf_dentry_info *odi, struct odf_sb
return odi;
}
-/*
- * Clears the odf_info data
+/*
+ * Clears the odf_info data
*/
void odf_put_info(struct odf_dentry_info *odi)
{
@@ -2247,8 +2247,8 @@ void odf_put_info(struct odf_dentry_info *odi)
kfree(odi);
}
-/*
- * Worker function for the cleanup thread. It recursively removes all entries
+/*
+ * Worker function for the cleanup thread. It recursively removes all entries
* in the reclaim directory
*/
void __odf_cleanup(void *args)
diff --git a/fs/unionfs/odf.h b/fs/unionfs/odf.h
index 8a06d48..307d2ad 100644
--- a/fs/unionfs/odf.h
+++ b/fs/unionfs/odf.h
@@ -23,7 +23,7 @@
#define ODF_INAME_LEN 10
/* Lookup flags (what to create if lookup fails) */
-#define ODF_LOOKUP_FILE 1
+#define ODF_LOOKUP_FILE 1
#define ODF_LOOKUP_DIR 2
#define ODF_LOOKUP_RMV_WH 4
#define ODF_LOOKUP_OPQ 8
@@ -41,7 +41,7 @@
#define ODF_RMV_NOTWH 2
#define ODF_RMV_ANY (ODF_RMV_WH|ODF_RMV_NOTWH)
-/* Inode flags */
+/* Inode flags */
#define ODF_WHITEOUT FS_SECRM_FL //0x01000000
#define ODF_OPAQUE FS_COMPR_FL // 0x02000000
@@ -83,7 +83,7 @@ char *odf_read_sb_data(struct odf_sb_info *odf_sb, int **bid);
int odf_write_sb_data(struct odf_sb_info* osi, struct unionfs_data *data,
struct path *lower_paths, int branches);
int odf_parse_options(char *options, char **odf_path);
-int odf_update_uuids(struct odf_sb_info *odf, struct path *old_paths, int
old_branches,
+int odf_update_uuids(struct odf_sb_info *odf, struct path *old_paths, int
old_branches,
struct path *new_paths, int new_branches);
static inline char *odf_get_branch_uuid(struct odf_sb_info *odf, int branch)
{
@@ -95,8 +95,8 @@ int odf_lookup(struct dentry *parent, struct dentry *dentry,
int flags);
struct odf_dentry_info *__odf_lookup(struct odf_sb_info *osi, struct
odf_dentry_info *parent,
const char *name, int len, int flags, struct odf_dentry_info
*old_odi,
struct dentry *link);
-static inline struct odf_dentry_info *odf_lookup_name(struct odf_sb_info *osi,
- struct odf_dentry_info *parent, const char *name, int len,
+static inline struct odf_dentry_info *odf_lookup_name(struct odf_sb_info *osi,
+ struct odf_dentry_info *parent, const char *name, int len,
int flags, struct odf_dentry_info *old_odi)
{
return __odf_lookup(osi, parent, name, len, flags, old_odi, NULL);
diff --git a/fs/unionfs/rename.c b/fs/unionfs/rename.c
index fd07d94..8410bb2 100644
--- a/fs/unionfs/rename.c
+++ b/fs/unionfs/rename.c
@@ -31,7 +31,7 @@ int copyup_empty_dir(struct inode *parent, struct dentry
*dentry, int mode)
hidden_dentry = unionfs_lower_dentry_idx(dentry, bindex);
if (!hidden_dentry) {
hidden_dentry = create_parents(parent, dentry, bindex);
- if (!hidden_dentry || IS_ERR(hidden_dentry)) {
+ if (!hidden_dentry || IS_ERR(hidden_dentry)) {
printk(KERN_DEBUG "hidden dentry NULL for "
"bindex = %d\n", bindex);
err = PTR_ERR(hidden_dentry);
@@ -166,7 +166,7 @@ static int do_unionfs_rename(struct inode *old_dir,
new_bend = old_bend;
}
}
-
+
/* Rename source to destination. */
for (bindex = old_bstart; bindex <= old_bend; bindex++) {
err = __unionfs_rename(old_dir, old_dentry, new_dir,
new_dentry, bindex);
@@ -185,15 +185,15 @@ static int do_unionfs_rename(struct inode *old_dir,
whiteout = 1;
/* only need to copyup if bstart is not 0 */
- if (do_copyup && old_bstart > 0) {
+ if (do_copyup && old_bstart > 0) {
bindex = 0;
-
+
if (S_ISDIR(old_dentry->d_inode->i_mode)) {
/* at this point we can safely assume the directory
* is logically empty, so mkdir at branch 0 */
- err = copyup_empty_dir(new_dir,
- new_dentry,
+ err = copyup_empty_dir(new_dir,
+ new_dentry,
old_dentry->d_inode->i_mode);
if (err)
goto revert;
@@ -343,7 +343,7 @@ int unionfs_rename(struct inode *old_dir, struct dentry
*old_dentry,
goto out;
/* if the new dentry exists at branch 0 and is a whiteout
- * or if it is a logically empty directory remove it,
+ * or if it is a logically empty directory remove it,
* since it will cause us problems when we copyup */
hidden = unionfs_lower_dentry_idx(new_dentry, 0);
if (hidden && hidden->d_inode ) {
diff --git a/fs/unionfs/sioq.c b/fs/unionfs/sioq.c
index 30c7cb0..44d347a 100644
--- a/fs/unionfs/sioq.c
+++ b/fs/unionfs/sioq.c
@@ -101,7 +101,7 @@ void run_sioa(struct sioa_args *args, void (*work) (void*),
signed long timeout)
kernel_thread(__run_sioa, args, 0);
}
-/* Synchronous wake up an sioa thread, makes sure the thread
+/* Synchronous wake up an sioa thread, makes sure the thread
* finishes its work before the caller resumes
*/
void wake_up_and_wait_sioa(struct sioa_args *args)
@@ -123,7 +123,7 @@ void wake_up_sioa(struct sioa_args *args)
* because of a synchronous call to wake_up_sioa, so if we wait for the
* lock here we'll end being a synchronous call as well. */
if (!mutex_trylock(&args->lock))
- return;
+ return;
wake_up_process(args->process);
schedule();
mutex_unlock(&args->lock);
diff --git a/fs/unionfs/super.c b/fs/unionfs/super.c
index a6137ae..f92f2a2 100644
--- a/fs/unionfs/super.c
+++ b/fs/unionfs/super.c
@@ -104,9 +104,9 @@ static void unionfs_put_super(struct super_block *sb)
spd = UNIONFS_SB(sb);
if (!spd)
return;
-
+
odf_put_super(UNIONFS_SB(sb)->odf);
-
+
bstart = sbstart(sb);
bend = sbend(sb);
@@ -568,7 +568,7 @@ static int unionfs_remount_fs(struct super_block *sb, int
*flags,
odfforce = 1;
continue;
}
-
+
/*
* All of our options take an argument now. (Insert ones
* that don't above this check.) So at this stage optname
@@ -693,7 +693,7 @@ out_no_change:
- /*
+ /*
* Update the odf. rewrite the superblock data file with all
* the new branch information
*/
@@ -708,9 +708,9 @@ out_no_change:
if (err)
goto out_release;
odf->opaque_branch_id = new_data[0].branch_id;
-
+
/* if odfforce is not set, wake up the cleanup thread and force it to
- * cleanup everything
+ * cleanup everything
*/
if (!odfforce) {
odf->cleanup->cleanup.force = 1;
diff --git a/fs/unionfs/union.h b/fs/unionfs/union.h
index 56e0528..70ec54e 100644
--- a/fs/unionfs/union.h
+++ b/fs/unionfs/union.h
@@ -90,9 +90,9 @@ struct unionfs_file_info {
/* odf dentry data in memory */
struct odf_dentry_info {
- /* The odf dentry info should contain info on the location of
+ /* The odf dentry info should contain info on the location of
* the data in the odf file. Right now i keep a dentry for easy
- * lookup in the underlying ext2
+ * lookup in the underlying ext2
*/
struct mutex lock;
u64 inum;
diff --git a/fs/unionfs/unlink.c b/fs/unionfs/unlink.c
index 8702d72..41110ca 100644
--- a/fs/unionfs/unlink.c
+++ b/fs/unionfs/unlink.c
@@ -39,7 +39,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 */
@@ -51,25 +51,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();
@@ -166,7 +166,7 @@ int unionfs_unlink(struct inode *dir, struct dentry *dentry)
* ODF entry was removed and replaced by a previous call
* to create_whiteout. If not, the original entry is still
* here, so we just remove it only if its not a whiteout
- */
+ */
/* FIXME: what if this fails? */
err = odf_remove(dentry, ODF_RMV_NOTWH);
d_drop(dentry);
@@ -216,18 +216,18 @@ static int unionfs_do_rmdir(struct inode *dir, struct
dentry *dentry)
/* FIXME: create wh for opaque dirs as well? or force to check all
branches? */
if (err || odf_get_opaque(dentry->d_sb, dentry) != 1) {
if (err == -EIO)
- printk(KERN_WARNING
+ printk(KERN_WARNING
"unionfs_rmdir: IO error removing 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