commit 583e5016dd1ac5dbd6091a566a6012d6c3aad950
Author: Erez_Zadok <[EMAIL PROTECTED]>
Date: Thu May 31 22:58:26 2007 -0400
properly indent all code
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
diff --git a/fs/unionfs/commonfops.c b/fs/unionfs/commonfops.c
index 8ef5836..1644de5 100644
--- a/fs/unionfs/commonfops.c
+++ b/fs/unionfs/commonfops.c
@@ -113,7 +113,7 @@ int unionfs_silly_rename(struct dentry *dentry, struct
dentry *hidden_dentry)
struct dentry *hidden_new_dir_dentry;
sprintf(name, ".unionfs%*.*lx",
- i_inosize, i_inosize, hidden_dentry->d_inode->i_ino);
+ i_inosize, i_inosize, hidden_dentry->d_inode->i_ino);
tmp_dentry = NULL;
do {
@@ -124,7 +124,7 @@ int unionfs_silly_rename(struct dentry *dentry, struct
dentry *hidden_dentry)
sprintf(suffix, "%*.*x", countersize, countersize, counter);
printk(KERN_DEBUG "unionfs: trying to rename %s to %s\n",
- hidden_dentry->d_name.name, name);
+ hidden_dentry->d_name.name, name);
tmp_dentry = lookup_one_len(name, hidden_dentry->d_parent,
strlen(name));
@@ -141,7 +141,7 @@ int unionfs_silly_rename(struct dentry *dentry, struct
dentry *hidden_dentry)
lock_rename(hidden_old_dir_dentry, hidden_new_dir_dentry);
err = vfs_rename(hidden_old_dir_dentry->d_inode, hidden_dentry,
- hidden_new_dir_dentry->d_inode, tmp_dentry);
+ hidden_new_dir_dentry->d_inode, tmp_dentry);
unlock_rename(hidden_old_dir_dentry, hidden_new_dir_dentry);
@@ -154,7 +154,7 @@ int unionfs_silly_rename(struct dentry *dentry, struct
dentry *hidden_dentry)
/* create a whiteout */
tmp_dentry = odf_lookup_name(dentry->d_parent, name,
- strlen(name), ODF_LOOKUP_WH);
+ strlen(name), ODF_LOOKUP_WH);
if (IS_ERR(tmp_dentry))
err = PTR_ERR(tmp_dentry);
else
diff --git a/fs/unionfs/config.c b/fs/unionfs/config.c
index 00b99ca..63121ac 100644
--- a/fs/unionfs/config.c
+++ b/fs/unionfs/config.c
@@ -95,19 +95,19 @@ static ssize_t unionfs_read_num(struct unionfs_config_attr
*attr, char *page)
static ssize_t unionfs_read_help(struct unionfs_config_attr *attr, char *page)
{
return snprintf(page, PAGE_SIZE, "\n"
- TIMEOUT ": " TIMEOUT_INFO "\n\n"
- THRESH_BH ": " THRESH_BH_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,
- THRESH_IH_DEF, THRESH_IL_DEF
- );
+ TIMEOUT ": " TIMEOUT_INFO "\n\n"
+ THRESH_BH ": " THRESH_BH_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,
+ THRESH_IH_DEF, THRESH_IL_DEF
+ );
}
/* writes numbers within a range */
static ssize_t unionfs_write_num(struct unionfs_config_attr *attr,
- const char *page, size_t count)
+ const char *page, size_t count)
{
unsigned long tmp;
char *p = (char *) page;
@@ -118,27 +118,27 @@ static ssize_t unionfs_write_num(struct
unionfs_config_attr *attr,
if (tmp > attr->unionfs_attr->max || tmp < attr->unionfs_attr->min) {
printk("unionfs: attribute out of range (%d - %d)\n",
- attr->unionfs_attr->min,
attr->unionfs_attr->max);
+ attr->unionfs_attr->min, attr->unionfs_attr->max);
return -ERANGE;
}
/* if min/max depends on another val, check if its valid */
switch(attr->depend_mode) {
- case DEPEND_MAX:
- if (tmp >= attr->depended->val) {
- printk("unionfs: the value must be lower than
the value of %s\n",
- attr->depended->name);
- return -ERANGE;
- }
+ case DEPEND_MAX:
+ if (tmp >= attr->depended->val) {
+ printk("unionfs: the value must be lower than the value
of %s\n",
+ attr->depended->name);
+ return -ERANGE;
+ }
break;
- case DEPEND_MIN:
- if (tmp <= attr->depended->val) {
- printk("unionfs: the value must be higher than
the value of %s\n",
- attr->depended->name);
- return -ERANGE;
- }
+ case DEPEND_MIN:
+ if (tmp <= attr->depended->val) {
+ printk("unionfs: the value must be higher than the
value of %s\n",
+ attr->depended->name);
+ return -ERANGE;
+ }
break;
}
@@ -283,8 +283,8 @@ int unionfs_config_init(void)
err = configfs_register_subsystem(&unionfs_subsys);
if (err)
printk(KERN_ERR "Error %d while registering subsystem %s\n",
- err,
- unionfs_subsys.su_group.cg_item.ci_namebuf);
+ err,
+ unionfs_subsys.su_group.cg_item.ci_namebuf);
return err;
}
diff --git a/fs/unionfs/config.h b/fs/unionfs/config.h
index 410acc3..dfd7043 100644
--- a/fs/unionfs/config.h
+++ b/fs/unionfs/config.h
@@ -70,4 +70,3 @@ extern int unionfs_config_init(void);
extern struct unionfs_attributes *get_attributes(void);
#endif /* not _CONFIG_H__ */
-
diff --git a/fs/unionfs/debug.c b/fs/unionfs/debug.c
index ab168cc..9fc4706 100644
--- a/fs/unionfs/debug.c
+++ b/fs/unionfs/debug.c
@@ -37,316 +37,316 @@ do { \
void __unionfs_check_inode(const struct inode *inode,
const char *fname, const char *fxn, int line)
{
- int bindex;
- int istart, iend;
- struct inode *lower_inode;
- struct super_block *sb;
- int printed_caller = 0;
+ int bindex;
+ int istart, iend;
+ struct inode *lower_inode;
+ struct super_block *sb;
+ int printed_caller = 0;
- /* for inodes now */
- BUG_ON(!inode);
- sb = inode->i_sb;
- istart = ibstart(inode);
- iend = ibend(inode);
- if (istart > iend) {
- PRINT_CALLER;
- printk(" Ci0: inode=%p istart/end=%d:%d\n",
- inode, istart, iend);
- }
- if ((istart == -1 && iend != -1) ||
- (istart != -1 && iend == -1)) {
- PRINT_CALLER;
- printk(" Ci1: inode=%p istart/end=%d:%d\n",
- inode, istart, iend);
- }
- if (!S_ISDIR(inode->i_mode)) {
- if (iend != istart) {
- PRINT_CALLER;
- printk(" Ci2: inode=%p istart=%d iend=%d\n",
- inode, istart, iend);
- }
- }
+ /* for inodes now */
+ BUG_ON(!inode);
+ sb = inode->i_sb;
+ istart = ibstart(inode);
+ iend = ibend(inode);
+ if (istart > iend) {
+ PRINT_CALLER;
+ printk(" Ci0: inode=%p istart/end=%d:%d\n",
+ inode, istart, iend);
+ }
+ if ((istart == -1 && iend != -1) ||
+ (istart != -1 && iend == -1)) {
+ PRINT_CALLER;
+ printk(" Ci1: inode=%p istart/end=%d:%d\n",
+ inode, istart, iend);
+ }
+ if (!S_ISDIR(inode->i_mode)) {
+ if (iend != istart) {
+ PRINT_CALLER;
+ printk(" Ci2: inode=%p istart=%d iend=%d\n",
+ inode, istart, iend);
+ }
+ }
- for (bindex = sbstart(sb); bindex < sbmax(sb); bindex++) {
- if (!UNIONFS_I(inode)) {
- PRINT_CALLER;
- printk(" Ci3: no inode_info %p\n", inode);
- return;
- }
- if (!UNIONFS_I(inode)->lower_inodes) {
- PRINT_CALLER;
- printk(" Ci4: no lower_inodes %p\n", inode);
- return;
- }
- lower_inode = unionfs_lower_inode_idx(inode, bindex);
- if (lower_inode) {
- if (bindex < istart || bindex > iend) {
- PRINT_CALLER;
- printk(" Ci5: inode/linode=%p:%p bindex=%d istart/end=%d:%d\n",
- inode, lower_inode, bindex, istart, iend);
- } else if ((int)lower_inode == 0x5a5a5a5a) { /* freed inode! */
- PRINT_CALLER;
- printk(" Ci6: inode/linode=%p:%p bindex=%d istart/end=%d:%d\n",
- inode, lower_inode, bindex, istart, iend);
- }
- } else { /* lower_inode == NULL */
- if (bindex >= istart && bindex <= iend) {
- /*
- * directories can have NULL lower inodes in b/t start/end, but
- * NOT if at the start/end range.
- */
- if (!(S_ISDIR(inode->i_mode) && bindex > istart && bindex < iend)) {
- PRINT_CALLER;
- printk(" Ci7: inode/linode=%p:%p bindex=%d istart/end=%d:%d\n",
- inode, lower_inode, bindex, istart, iend);
+ for (bindex = sbstart(sb); bindex < sbmax(sb); bindex++) {
+ if (!UNIONFS_I(inode)) {
+ PRINT_CALLER;
+ printk(" Ci3: no inode_info %p\n", inode);
+ return;
+ }
+ if (!UNIONFS_I(inode)->lower_inodes) {
+ PRINT_CALLER;
+ printk(" Ci4: no lower_inodes %p\n", inode);
+ return;
+ }
+ lower_inode = unionfs_lower_inode_idx(inode, bindex);
+ if (lower_inode) {
+ if (bindex < istart || bindex > iend) {
+ PRINT_CALLER;
+ printk(" Ci5: inode/linode=%p:%p bindex=%d
istart/end=%d:%d\n",
+ inode, lower_inode, bindex, istart,
iend);
+ } else if ((int)lower_inode == 0x5a5a5a5a) { /* freed
inode! */
+ PRINT_CALLER;
+ printk(" Ci6: inode/linode=%p:%p bindex=%d
istart/end=%d:%d\n",
+ inode, lower_inode, bindex, istart,
iend);
+ }
+ } else { /* lower_inode == NULL */
+ if (bindex >= istart && bindex <= iend) {
+ /*
+ * directories can have NULL lower inodes in
b/t start/end, but
+ * NOT if at the start/end range.
+ */
+ if (!(S_ISDIR(inode->i_mode) && bindex > istart
&& bindex < iend)) {
+ PRINT_CALLER;
+ printk(" Ci7: inode/linode=%p:%p
bindex=%d istart/end=%d:%d\n",
+ inode, lower_inode, bindex,
istart, iend);
+ }
+ }
+ }
}
- }
- }
- }
}
void __unionfs_check_dentry(const struct dentry *dentry,
const char *fname, const char *fxn, int line)
{
- int bindex;
- int dstart, dend, istart, iend;
- struct dentry *lower_dentry;
- struct inode *inode, *lower_inode;
- struct super_block *sb;
- struct vfsmount *lower_mnt;
- int printed_caller = 0;
+ int bindex;
+ int dstart, dend, istart, iend;
+ struct dentry *lower_dentry;
+ struct inode *inode, *lower_inode;
+ struct super_block *sb;
+ struct vfsmount *lower_mnt;
+ int printed_caller = 0;
- BUG_ON(!dentry);
- sb = dentry->d_sb;
- inode = dentry->d_inode;
- dstart = dbstart(dentry);
- dend = dbend(dentry);
- BUG_ON(dstart > dend);
+ BUG_ON(!dentry);
+ sb = dentry->d_sb;
+ inode = dentry->d_inode;
+ dstart = dbstart(dentry);
+ dend = dbend(dentry);
+ BUG_ON(dstart > dend);
- if ((dstart == -1 && dend != -1) ||
- (dstart != -1 && dend == -1)) {
- PRINT_CALLER;
- printk(" CD0: dentry=%p dstart/end=%d:%d\n",
- dentry, dstart, dend);
- }
- /*
- * check for NULL dentries inside the start/end range, or
- * non-NULL dentries outside the start/end range.
- */
- for (bindex = sbstart(sb); bindex < sbmax(sb); bindex++) {
- lower_dentry = unionfs_lower_dentry_idx(dentry, bindex);
- if (lower_dentry) {
- if (bindex < dstart || bindex > dend) {
- PRINT_CALLER;
- printk(" CD1: dentry/lower=%p:%p(%p) bindex=%d dstart/end=%d:%d\n",
- dentry, lower_dentry,
- (lower_dentry ? lower_dentry->d_inode : (void *) 0xffffffff),
- bindex, dstart, dend);
- }
- } else { /* lower_dentry == NULL */
- if (bindex >= dstart && bindex <= dend) {
+ if ((dstart == -1 && dend != -1) ||
+ (dstart != -1 && dend == -1)) {
+ PRINT_CALLER;
+ printk(" CD0: dentry=%p dstart/end=%d:%d\n",
+ dentry, dstart, 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.
+ * check for NULL dentries inside the start/end range, or
+ * non-NULL dentries outside the start/end range.
*/
- if (!d_deleted((struct dentry *) dentry) &&
- inode && !(inode && S_ISDIR(inode->i_mode) &&
- bindex > dstart && bindex < dend)) {
- PRINT_CALLER;
- printk(" CD2: dentry/lower=%p:%p(%p) bindex=%d dstart/end=%d:%d\n",
- dentry, lower_dentry,
- (lower_dentry ? lower_dentry->d_inode : (void *) 0xffffffff),
- bindex, dstart, dend);
+ for (bindex = sbstart(sb); bindex < sbmax(sb); bindex++) {
+ lower_dentry = unionfs_lower_dentry_idx(dentry, bindex);
+ if (lower_dentry) {
+ if (bindex < dstart || bindex > dend) {
+ PRINT_CALLER;
+ printk(" CD1: dentry/lower=%p:%p(%p) bindex=%d
dstart/end=%d:%d\n",
+ dentry, lower_dentry,
+ (lower_dentry ? lower_dentry->d_inode :
(void *) 0xffffffff),
+ 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 (!d_deleted((struct dentry *) dentry) &&
+ inode && !(inode && S_ISDIR(inode->i_mode)
&&
+ bindex > dstart && bindex <
dend)) {
+ PRINT_CALLER;
+ printk(" CD2: dentry/lower=%p:%p(%p)
bindex=%d dstart/end=%d:%d\n",
+ dentry, lower_dentry,
+ (lower_dentry ?
lower_dentry->d_inode : (void *) 0xffffffff),
+ bindex, dstart, dend);
+ }
+ }
+ }
}
- }
- }
- }
- /* check for vfsmounts same as for dentries */
- for (bindex = sbstart(sb); bindex < sbmax(sb); bindex++) {
- lower_mnt = unionfs_lower_mnt_idx(dentry, bindex);
- if (lower_mnt) {
- if (bindex < dstart || bindex > dend) {
- PRINT_CALLER;
- printk(" CM0: dentry/lmnt=%p:%p bindex=%d dstart/end=%d:%d\n",
- 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 (inode && !(inode && S_ISDIR(inode->i_mode) &&
- bindex > dstart && bindex < dend)) {
- PRINT_CALLER;
- printk(" CM1: dentry/lmnt=%p:%p bindex=%d dstart/end=%d:%d\n",
- dentry, lower_mnt, bindex, dstart, dend);
+ /* check for vfsmounts same as for dentries */
+ for (bindex = sbstart(sb); bindex < sbmax(sb); bindex++) {
+ lower_mnt = unionfs_lower_mnt_idx(dentry, bindex);
+ if (lower_mnt) {
+ if (bindex < dstart || bindex > dend) {
+ PRINT_CALLER;
+ printk(" CM0: dentry/lmnt=%p:%p bindex=%d
dstart/end=%d:%d\n",
+ 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 (inode && !(inode && S_ISDIR(inode->i_mode)
&&
+ bindex > dstart && bindex <
dend)) {
+ PRINT_CALLER;
+ printk(" CM1: dentry/lmnt=%p:%p
bindex=%d dstart/end=%d:%d\n",
+ dentry, lower_mnt, bindex,
dstart, dend);
+ }
+ }
+ }
+ }
+
+ /* for inodes now */
+ if (!inode)
+ return;
+ istart = ibstart(inode);
+ iend = ibend(inode);
+ BUG_ON(istart > iend);
+ if ((istart == -1 && iend != -1) ||
+ (istart != -1 && iend == -1)) {
+ PRINT_CALLER;
+ printk(" CI0: dentry/inode=%p:%p istart/end=%d:%d\n",
+ dentry, inode, istart, iend);
+ }
+ if (istart != dstart) {
+ PRINT_CALLER;
+ printk(" CI1: dentry/inode=%p:%p istart=%d dstart=%d\n",
+ dentry, inode, istart, dstart);
+ }
+ if (iend != dend) {
+ PRINT_CALLER;
+ printk(" CI2: dentry/inode=%p:%p iend=%d dend=%d\n",
+ dentry, inode, iend, dend);
}
- }
- }
- }
- /* for inodes now */
- if (!inode)
- return;
- istart = ibstart(inode);
- iend = ibend(inode);
- BUG_ON(istart > iend);
- if ((istart == -1 && iend != -1) ||
- (istart != -1 && iend == -1)) {
- PRINT_CALLER;
- printk(" CI0: dentry/inode=%p:%p istart/end=%d:%d\n",
- dentry, inode, istart, iend);
- }
- if (istart != dstart) {
- PRINT_CALLER;
- printk(" CI1: dentry/inode=%p:%p istart=%d dstart=%d\n",
- dentry, inode, istart, dstart);
- }
- if (iend != dend) {
- PRINT_CALLER;
- printk(" CI2: dentry/inode=%p:%p iend=%d dend=%d\n",
- dentry, inode, iend, dend);
- }
+ if (!S_ISDIR(inode->i_mode)) {
+ if (dend != dstart) {
+ PRINT_CALLER;
+ printk(" CI3: dentry/inode=%p:%p dstart=%d dend=%d\n",
+ dentry, inode, dstart, dend);
+ }
+ if (iend != istart) {
+ PRINT_CALLER;
+ printk(" CI4: dentry/inode=%p:%p istart=%d iend=%d\n",
+ dentry, inode, istart, iend);
+ }
+ }
- if (!S_ISDIR(inode->i_mode)) {
- if (dend != dstart) {
- PRINT_CALLER;
- printk(" CI3: dentry/inode=%p:%p dstart=%d dend=%d\n",
- dentry, inode, dstart, dend);
- }
- if (iend != istart) {
- PRINT_CALLER;
- printk(" CI4: dentry/inode=%p:%p istart=%d iend=%d\n",
- dentry, inode, istart, iend);
- }
- }
+ for (bindex = sbstart(sb); bindex < sbmax(sb); bindex++) {
+ lower_inode = unionfs_lower_inode_idx(inode, bindex);
+ if (lower_inode) {
+ if (bindex < istart || bindex > iend) {
+ PRINT_CALLER;
+ printk(" CI5: dentry/linode=%p:%p bindex=%d
istart/end=%d:%d\n",
+ dentry, lower_inode, bindex, istart,
iend);
+ } else if ((int)lower_inode == 0x5a5a5a5a) { /* freed
inode! */
+ PRINT_CALLER;
+ printk(" CI6: dentry/linode=%p:%p bindex=%d
istart/end=%d:%d\n",
+ dentry, lower_inode, bindex, istart,
iend);
+ }
+ } else { /* lower_inode == NULL */
+ if (bindex >= istart && bindex <= iend) {
+ /*
+ * directories can have NULL lower inodes in
b/t start/end, but
+ * NOT if at the start/end range.
+ */
+ if (!(S_ISDIR(inode->i_mode) && bindex > istart
&& bindex < iend)) {
+ PRINT_CALLER;
+ printk(" CI7: dentry/linode=%p:%p
bindex=%d istart/end=%d:%d\n",
+ dentry, lower_inode, bindex,
istart, iend);
+ }
+ }
+ }
+ }
- for (bindex = sbstart(sb); bindex < sbmax(sb); bindex++) {
- lower_inode = unionfs_lower_inode_idx(inode, bindex);
- if (lower_inode) {
- if (bindex < istart || bindex > iend) {
- PRINT_CALLER;
- printk(" CI5: dentry/linode=%p:%p bindex=%d istart/end=%d:%d\n",
- dentry, lower_inode, bindex, istart, iend);
- } else if ((int)lower_inode == 0x5a5a5a5a) { /* freed inode! */
- PRINT_CALLER;
- printk(" CI6: dentry/linode=%p:%p bindex=%d istart/end=%d:%d\n",
- dentry, lower_inode, bindex, istart, iend);
- }
- } else { /* lower_inode == NULL */
- if (bindex >= istart && bindex <= iend) {
/*
- * directories can have NULL lower inodes in b/t start/end, but
- * NOT if at the start/end range.
+ * If it's a directory, then intermediate objects b/t start/end can be
NULL.
+ * But, check that all three are NULL: lower dentry, mnt, and inode.
*/
- if (!(S_ISDIR(inode->i_mode) && bindex > istart && bindex < iend)) {
- PRINT_CALLER;
- printk(" CI7: dentry/linode=%p:%p bindex=%d istart/end=%d:%d\n",
- dentry, lower_inode, bindex, istart, iend);
- }
- }
- }
- }
-
- /*
- * If it's a directory, then intermediate objects b/t start/end can be NULL.
- * But, check that all three are NULL: lower dentry, mnt, and inode.
- */
- if (S_ISDIR(inode->i_mode))
- for (bindex = dstart+1; bindex < dend-1; bindex++) {
- lower_inode = unionfs_lower_inode_idx(inode, bindex);
- lower_dentry = unionfs_lower_dentry_idx(dentry, bindex);
- lower_mnt = unionfs_lower_mnt_idx(dentry, bindex);
- if (!((lower_inode && lower_dentry && lower_mnt) ||
- (!lower_inode && !lower_dentry && !lower_mnt)))
- printk(" Cx: lmnt/ldentry/linode=%p:%p:%p bindex=%d dstart/end=%d:%d\n",
- lower_mnt, lower_dentry, lower_inode, bindex, dstart, dend);
- }
+ if (S_ISDIR(inode->i_mode))
+ for (bindex = dstart+1; bindex < dend-1; bindex++) {
+ lower_inode = unionfs_lower_inode_idx(inode, bindex);
+ lower_dentry = unionfs_lower_dentry_idx(dentry, bindex);
+ lower_mnt = unionfs_lower_mnt_idx(dentry, bindex);
+ if (!((lower_inode && lower_dentry && lower_mnt) ||
+ (!lower_inode && !lower_dentry && !lower_mnt)))
+ printk(" Cx: lmnt/ldentry/linode=%p:%p:%p
bindex=%d dstart/end=%d:%d\n",
+ lower_mnt, lower_dentry, lower_inode,
bindex, dstart, dend);
+ }
}
void __unionfs_check_file(const struct file *file,
- const char *fname, const char *fxn, int line)
+ const char *fname, const char *fxn, int line)
{
- int bindex;
- int dstart, dend, fstart, fend;
- struct dentry *dentry;
- struct file *lower_file;
- struct inode *inode;
- struct super_block *sb;
- int printed_caller = 0;
+ int bindex;
+ int dstart, dend, fstart, fend;
+ struct dentry *dentry;
+ struct file *lower_file;
+ struct inode *inode;
+ struct super_block *sb;
+ int printed_caller = 0;
- BUG_ON(!file);
- dentry = file->f_dentry;
- sb = dentry->d_sb;
- dstart = dbstart(dentry);
- dend = dbend(dentry);
- BUG_ON(dstart > dend);
- fstart = fbstart(file);
- fend = fbend(file);
- BUG_ON(fstart > fend);
+ BUG_ON(!file);
+ dentry = file->f_dentry;
+ sb = dentry->d_sb;
+ dstart = dbstart(dentry);
+ dend = dbend(dentry);
+ BUG_ON(dstart > dend);
+ fstart = fbstart(file);
+ fend = fbend(file);
+ BUG_ON(fstart > fend);
- if ((fstart == -1 && fend != -1) ||
- (fstart != -1 && fend == -1)) {
- PRINT_CALLER;
- printk(" CF0: file/dentry=%p:%p fstart/end=%d:%d\n",
- file, dentry, fstart, fend);
- }
- if (fstart != dstart) {
- PRINT_CALLER;
- printk(" CF1: file/dentry=%p:%p fstart=%d dstart=%d\n",
- file, dentry, fstart, dstart);
- }
- if (fend != dend) {
- PRINT_CALLER;
- printk(" CF2: file/dentry=%p:%p fend=%d dend=%d\n",
- file, dentry, fend, dend);
- }
- inode = dentry->d_inode;
- if (!S_ISDIR(inode->i_mode)) {
- if (fend != fstart) {
- PRINT_CALLER;
- printk(" CF3: file/inode=%p:%p fstart=%d fend=%d\n",
- file, inode, fstart, fend);
- }
- if (dend != dstart) {
- PRINT_CALLER;
- printk(" CF4: file/dentry=%p:%p dstart=%d dend=%d\n",
- file, dentry, dstart, dend);
- }
- }
+ if ((fstart == -1 && fend != -1) ||
+ (fstart != -1 && fend == -1)) {
+ PRINT_CALLER;
+ printk(" CF0: file/dentry=%p:%p fstart/end=%d:%d\n",
+ file, dentry, fstart, fend);
+ }
+ if (fstart != dstart) {
+ PRINT_CALLER;
+ printk(" CF1: file/dentry=%p:%p fstart=%d dstart=%d\n",
+ file, dentry, fstart, dstart);
+ }
+ if (fend != dend) {
+ PRINT_CALLER;
+ printk(" CF2: file/dentry=%p:%p fend=%d dend=%d\n",
+ file, dentry, fend, dend);
+ }
+ inode = dentry->d_inode;
+ if (!S_ISDIR(inode->i_mode)) {
+ if (fend != fstart) {
+ PRINT_CALLER;
+ printk(" CF3: file/inode=%p:%p fstart=%d fend=%d\n",
+ file, inode, fstart, fend);
+ }
+ if (dend != dstart) {
+ PRINT_CALLER;
+ printk(" CF4: file/dentry=%p:%p dstart=%d dend=%d\n",
+ file, dentry, dstart, dend);
+ }
+ }
- /*
- * check for NULL dentries inside the start/end range, or
- * non-NULL dentries outside the start/end range.
- */
- for (bindex = sbstart(sb); bindex < sbmax(sb); bindex++) {
- lower_file = unionfs_lower_file_idx(file, bindex);
- if (lower_file) {
- if (bindex < fstart || bindex > fend) {
- PRINT_CALLER;
- printk(" CF5: file/lower=%p:%p bindex=%d fstart/end=%d:%d\n",
- file, lower_file, bindex, fstart, fend);
- }
- } else { /* lower_file == NULL */
- if (bindex >= fstart && bindex <= fend) {
/*
- * directories can have NULL lower inodes in b/t start/end, but
- * NOT if at the start/end range.
+ * check for NULL dentries inside the start/end range, or
+ * non-NULL dentries outside the start/end range.
*/
- if (!(S_ISDIR(inode->i_mode) && bindex > fstart && bindex < fend)) {
- PRINT_CALLER;
- printk(" CF6: file/lower=%p:%p bindex=%d fstart/end=%d:%d\n",
- file, lower_file, bindex, fstart, fend);
+ for (bindex = sbstart(sb); bindex < sbmax(sb); bindex++) {
+ lower_file = unionfs_lower_file_idx(file, bindex);
+ if (lower_file) {
+ if (bindex < fstart || bindex > fend) {
+ PRINT_CALLER;
+ printk(" CF5: file/lower=%p:%p bindex=%d
fstart/end=%d:%d\n",
+ file, lower_file, bindex, fstart, fend);
+ }
+ } else { /* lower_file == NULL */
+ if (bindex >= fstart && bindex <= fend) {
+ /*
+ * directories can have NULL lower inodes in
b/t start/end, but
+ * NOT if at the start/end range.
+ */
+ if (!(S_ISDIR(inode->i_mode) && bindex > fstart
&& bindex < fend)) {
+ PRINT_CALLER;
+ printk(" CF6: file/lower=%p:%p
bindex=%d fstart/end=%d:%d\n",
+ file, lower_file, bindex,
fstart, fend);
+ }
+ }
+ }
}
- }
- }
- }
- __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 */
diff --git a/fs/unionfs/dirhelper.c b/fs/unionfs/dirhelper.c
index 65ca5fe..e0690b5 100644
--- a/fs/unionfs/dirhelper.c
+++ b/fs/unionfs/dirhelper.c
@@ -79,15 +79,15 @@ static int cleanup_util_callback(void *dirent, const char
*name, int namelen,
buf->filldir_called++;
if (name[0] == '.' &&
- (namelen == 1 || (name[1] == '.' && namelen == 2)))
- goto out;
+ (namelen == 1 || (name[1] == '.' && namelen == 2)))
+ goto out;
/* remove dir cache files or all if files if cleaning
* /odf/reclaim and /odf/sr
*/
if ((d_type == DT_REG && buf->mode != CLN_IC) ||
- (namelen == ODF_CONTENT_LEN &&
- !strncmp(name, ODF_CONTENT, namelen))) {
+ (namelen == ODF_CONTENT_LEN &&
+ !strncmp(name, ODF_CONTENT, namelen))) {
dentry = lookup_one_len(name, buf->dir, namelen);
@@ -146,7 +146,7 @@ static int readdir_util_callback(void *dirent, const char
*name, int namelen,
buf->filldir_called++;
if (name[0] == '.' &&
- (namelen == 1 || (name[1] == '.' && namelen == 2))){
+ (namelen == 1 || (name[1] == '.' && namelen == 2))){
if (buf->mode != RD_CACHE_ODF)
goto out;
else
@@ -351,8 +351,8 @@ retry:
goto out;
}
odf_file = dentry_open(d_odf,
- UNIONFS_SB(sb)->odf.mnt,
- O_TRUNC|O_CREAT|O_WRONLY);
+ UNIONFS_SB(sb)->odf.mnt,
+ O_TRUNC|O_CREAT|O_WRONLY);
if (IS_ERR(odf_file)){
err = PTR_ERR(odf_file);
dput(d_odf);
@@ -395,8 +395,8 @@ retry:
mntget(unionfs_lower_mnt_idx(d_upper, bindex));
branchget(sb, bindex);
hidden_file =
- dentry_open(hidden_dentry, unionfs_lower_mnt_idx(d_upper,
bindex),
- O_RDONLY);
+ dentry_open(hidden_dentry,
unionfs_lower_mnt_idx(d_upper, bindex),
+ O_RDONLY);
if (IS_ERR(hidden_file)) {
err = PTR_ERR(hidden_file);
dput(hidden_dentry);
@@ -510,7 +510,7 @@ int unionfs_force_rm(struct dentry *dentry, struct dentry
**hidden_dentry,
sb = dentry->d_sb;
if (!S_ISDIR((*hidden_dentry)->d_inode->i_mode)) {
err = vfs_unlink((*hidden_dentry)->d_parent->d_inode,
- (*hidden_dentry));
+ (*hidden_dentry));
if (err)
goto out;
goto refresh;
@@ -533,8 +533,8 @@ int unionfs_force_rm(struct dentry *dentry, struct dentry
**hidden_dentry,
refresh:
*hidden_dentry = lookup_one_len(dentry->d_name.name,
- (*hidden_dentry)->d_parent,
- dentry->d_name.len);
+ (*hidden_dentry)->d_parent,
+ dentry->d_name.len);
if (IS_ERR(*hidden_dentry)) {
err = PTR_ERR(*hidden_dentry);
goto out;
@@ -563,7 +563,7 @@ out:
* ODF_CLEAN_DEFAULT: clean all caches but /odf/sr
* ODF_CLEAN_SR: clean /odf/sr
* ODF_CLEAN_FULL: clean /odf/ic and /odf/reclaim ignoring
- thresholds
+ thresholds
* Returns 1 if it manages to bring inodes/block below requested,
* threshold and 0 if not.
*/
@@ -655,8 +655,8 @@ cleanup_loop:
/* check if we have reached the threshold */
if ((mode & ODF_CLEAN_DEFAULT) &&
- (buf->blocks * 100 >= b_to_free) &&
- (buf->inodes * 100 >= i_to_free))
+ (buf->blocks * 100 >= b_to_free) &&
+ (buf->inodes * 100 >= i_to_free))
success = 1;
}
diff --git a/fs/unionfs/fanout.h b/fs/unionfs/fanout.h
index dd03a7c..4176228 100644
--- a/fs/unionfs/fanout.h
+++ b/fs/unionfs/fanout.h
@@ -132,14 +132,14 @@ static inline void unionfs_set_lower_inode(struct inode
*i, struct inode *val)
/* Superblock to lower superblock. */
static inline struct super_block *unionfs_lower_super(
- const struct super_block *sb)
+ const struct super_block *sb)
{
return UNIONFS_SB(sb)->data[sbstart(sb)].sb;
}
static inline struct super_block *unionfs_lower_super_idx(
- const struct super_block *sb,
- int index)
+ const struct super_block *sb,
+ int index)
{
return UNIONFS_SB(sb)->data[index].sb;
}
@@ -211,8 +211,8 @@ static inline void unionfs_set_lower_dentry_idx(struct
dentry *dent, int index,
}
static inline struct dentry *unionfs_lower_dentry_idx(
- const struct dentry *dent,
- int index)
+ const struct dentry *dent,
+ int index)
{
return UNIONFS_D(dent)->lower_paths[index].dentry;
}
@@ -229,8 +229,8 @@ static inline void unionfs_set_lower_mnt_idx(struct dentry
*dent, int index,
}
static inline struct vfsmount *unionfs_lower_mnt_idx(
- const struct dentry *dent,
- int index)
+ const struct dentry *dent,
+ int index)
{
return UNIONFS_D(dent)->lower_paths[index].mnt;
}
diff --git a/fs/unionfs/inode.c b/fs/unionfs/inode.c
index dcdd69a..0896626 100644
--- a/fs/unionfs/inode.c
+++ b/fs/unionfs/inode.c
@@ -95,7 +95,7 @@ static int unionfs_create(struct inode *parent, struct dentry
*dentry,
else {
err = odf_lookup(dentry->d_parent, dentry,
- ODF_LOOKUP_FILE|ODF_LOOKUP_RMV_WH);
+ ODF_LOOKUP_FILE|ODF_LOOKUP_RMV_WH);
if (!err)
err = odf_purge_dir_cache(dentry->d_parent);
if (!err)
@@ -103,9 +103,9 @@ static int unionfs_create(struct inode *parent, struct
dentry *dentry,
err = PTR_ERR(unionfs_interpose(dentry, parent->i_sb,
0));
if (!err) {
fsstack_copy_attr_times(parent,
- hidden_parent_dentry->d_inode);
+ hidden_parent_dentry->d_inode);
fsstack_copy_inode_size(parent,
- hidden_parent_dentry->d_inode);
+ hidden_parent_dentry->d_inode);
/* update number of links on parent directory */
parent->i_nlink = unionfs_get_nlinks(parent);
}
@@ -187,9 +187,9 @@ static int unionfs_link(struct dentry *old_dentry, struct
inode *dir,
/* don't copyup if new_dentry doesn't exist in union */
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)) {
+ dbstart(new_dentry) == dbend(new_dentry) &&
+ (!unionfs_lower_dentry_idx(new_dentry, 0) ||
+ !unionfs_lower_dentry_idx(new_dentry, 0)->d_inode)) {
set_dbstart(new_dentry, dbstart(old_dentry));
set_dbend(new_dentry, dbstart(old_dentry));
@@ -239,20 +239,20 @@ docopyup:
int bindex = 0;
err = copyup_dentry(old_dentry->d_parent->d_inode,
- old_dentry, old_bstart, bindex,
- old_dentry->d_name.name,
- old_dentry->d_name.len,
- NULL, old_dentry->d_inode->i_size);
+ old_dentry, old_bstart, bindex,
+ old_dentry->d_name.name,
+ old_dentry->d_name.len,
+ NULL, old_dentry->d_inode->i_size);
if (!err) {
hidden_new_dentry =
create_parents(dir, new_dentry,
- new_dentry->d_name.name, bindex);
+ new_dentry->d_name.name, bindex);
hidden_old_dentry = unionfs_lower_dentry(old_dentry);
if (hidden_new_dentry->d_inode &&
- UNIONFS_D(new_dentry)->odf.whiteout) {
+ UNIONFS_D(new_dentry)->odf.whiteout) {
err = unionfs_force_rm(new_dentry,
- &hidden_new_dentry,
- dbstart(old_dentry));
+ &hidden_new_dentry,
+ dbstart(old_dentry));
if (err)
goto out;
}
@@ -261,8 +261,8 @@ docopyup:
lock_parent(hidden_new_dentry);
/* do vfs_link */
err = vfs_link(hidden_old_dentry,
- hidden_dir_dentry->d_inode,
- hidden_new_dentry);
+ hidden_dir_dentry->d_inode,
+ hidden_new_dentry);
unlock_dir(hidden_dir_dentry);
goto check_link;
}
@@ -332,15 +332,15 @@ static int unionfs_symlink(struct inode *dir, struct
dentry *dentry,
* underlying dentry
*/
hidden_dentry = create_parents(dir, dentry,
- dentry->d_name.name,
- bstart);
+ dentry->d_name.name,
+ bstart);
if (!hidden_dentry || IS_ERR(hidden_dentry)) {
if (IS_ERR(hidden_dentry))
err = PTR_ERR(hidden_dentry);
- printk(KERN_DEBUG "hidden dentry NULL (or
error)"
- "for bindex = %d\n", bstart);
- goto out;
+ printk(KERN_DEBUG "hidden dentry NULL (or error)"
+ "for bindex = %d\n", bstart);
+ goto out;
}
unionfs_inherit_mnt(dentry->d_parent);
}
@@ -356,15 +356,15 @@ static int unionfs_symlink(struct inode *dir, struct
dentry *dentry,
if (!(err = is_robranch_super(dentry->d_sb, bstart))) {
mode = S_IALLUGO;
err =
- vfs_symlink(hidden_dir_dentry->d_inode,
- hidden_dentry, symname, mode);
+ vfs_symlink(hidden_dir_dentry->d_inode,
+ hidden_dentry, symname, mode);
}
unlock_dir(hidden_dir_dentry);
if (!(err || !hidden_dentry->d_inode)) {
/* update odf and remove any wh before interpose*/
err = odf_lookup(dentry->d_parent, dentry,
- ODF_LOOKUP_FILE|ODF_LOOKUP_RMV_WH);
+ ODF_LOOKUP_FILE|ODF_LOOKUP_RMV_WH);
if (!err)
/* only INTERPOSE_LOOKUP can return a value other than
0 or err */
err = PTR_ERR(unionfs_interpose(dentry, dir->i_sb, 0));
@@ -372,9 +372,9 @@ static int unionfs_symlink(struct inode *dir, struct dentry
*dentry,
err = odf_purge_dir_cache(dentry->d_parent);
if (!err) {
fsstack_copy_attr_times(dir,
- hidden_dir_dentry->d_inode);
+ hidden_dir_dentry->d_inode);
fsstack_copy_inode_size(dir,
- hidden_dir_dentry->d_inode);
+ hidden_dir_dentry->d_inode);
/* update number of links on parent directory */
dir->i_nlink = unionfs_get_nlinks(dir);
}
@@ -419,11 +419,11 @@ static int unionfs_mkdir(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,
- dentry->d_name.name,
- bindex);
+ dentry->d_name.name,
+ bindex);
if (!hidden_dentry || IS_ERR(hidden_dentry)) {
printk(KERN_DEBUG "hidden dentry NULL for "
- "bindex = %d\n", bindex);
+ "bindex = %d\n", bindex);
err = PTR_ERR(hidden_dentry);
goto out;
}
@@ -465,7 +465,7 @@ static int unionfs_mkdir(struct inode *parent, struct
dentry *dentry, int mode)
/* add to odf with opaque branch set to 0 */
err = odf_lookup(dentry->d_parent, dentry,
- ODF_LOOKUP_DIR|ODF_LOOKUP_RMV_WH|ODF_LOOKUP_OPQ);
+ ODF_LOOKUP_DIR|ODF_LOOKUP_RMV_WH|ODF_LOOKUP_OPQ);
if (err)
goto out;
err = odf_purge_dir_cache(dentry->d_parent);
@@ -476,9 +476,9 @@ static int unionfs_mkdir(struct inode *parent, struct
dentry *dentry, int mode)
err = PTR_ERR(unionfs_interpose(dentry, parent->i_sb, 0));
if (!err) {
fsstack_copy_attr_times(parent,
- hidden_parent_dentry->d_inode);
+ hidden_parent_dentry->d_inode);
fsstack_copy_inode_size(parent,
- hidden_parent_dentry->d_inode);
+ hidden_parent_dentry->d_inode);
/* update number of links on parent directory */
parent->i_nlink = unionfs_get_nlinks(parent);
@@ -515,13 +515,13 @@ static int unionfs_mknod(struct inode *dir, struct dentry
*dentry, int mode,
bstart = 0;
if (is_robranch_super(dentry->d_sb, bstart))
- goto out;
+ goto out;
hidden_dentry = unionfs_lower_dentry_idx(dentry, bstart);
if (!hidden_dentry) {
hidden_dentry = create_parents(dir, dentry,
- dentry->d_name.name,
- bstart);
+ dentry->d_name.name,
+ bstart);
if (IS_ERR(hidden_dentry)) {
printk(KERN_DEBUG
"failed to create parents on %d, err = %ld\n",
@@ -553,7 +553,7 @@ 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,
- ODF_LOOKUP_FILE|ODF_LOOKUP_RMV_WH);
+ ODF_LOOKUP_FILE|ODF_LOOKUP_RMV_WH);
if (!err)
err = odf_purge_dir_cache(dentry->d_parent);
if (!err)
@@ -561,9 +561,9 @@ static int unionfs_mknod(struct inode *dir, struct dentry
*dentry, int mode,
err = PTR_ERR(unionfs_interpose(dentry, dir->i_sb, 0));
if (!err) {
fsstack_copy_attr_times(dir,
- hidden_parent_dentry->d_inode);
+ hidden_parent_dentry->d_inode);
fsstack_copy_inode_size(dir,
- hidden_parent_dentry->d_inode);
+ hidden_parent_dentry->d_inode);
/* update number of links on parent directory */
dir->i_nlink = unionfs_get_nlinks(dir);
}
diff --git a/fs/unionfs/lookup.c b/fs/unionfs/lookup.c
index 22263bd..0e69ade 100644
--- a/fs/unionfs/lookup.c
+++ b/fs/unionfs/lookup.c
@@ -232,7 +232,7 @@ out_negative:
hidden_dir_dentry = unionfs_lower_dentry_idx(parent_dentry,
bindex);
if (hidden_dir_dentry && hidden_dir_dentry->d_inode)
first_hidden_dentry = lookup_one_len_nd(name,
- hidden_dir_dentry, namelen, nd);
+
hidden_dir_dentry, namelen, nd);
else
first_hidden_dentry = NULL;
first_dentry_offset = bindex;
@@ -277,7 +277,7 @@ out_positive:
if (lookupmode == INTERPOSE_PARTIAL) {
err = odf_lookup(parent_dentry, dentry, 0);
if (UNIONFS_D(dentry)->odf.dentry &&
- UNIONFS_D(dentry)->odf.whiteout){
+ UNIONFS_D(dentry)->odf.whiteout){
err = -ENOENT;
goto out_drop;
}
diff --git a/fs/unionfs/main.c b/fs/unionfs/main.c
index cfed27d..9da54ef 100644
--- a/fs/unionfs/main.c
+++ b/fs/unionfs/main.c
@@ -85,7 +85,7 @@ struct dentry *unionfs_interpose(struct dentry *dentry,
struct super_block *sb,
err = odf_lookup(dentry->d_parent, dentry, odf_flag);
if (err){
printk("unionfs_interpose: odf failed to create dentry:
%s, %d\n",
- dentry->d_name.name, err);
+ dentry->d_name.name, err);
goto out;
}
/* check whiteouts and opaqueness */
@@ -452,8 +452,8 @@ out:
* We want to mount our stackable file system on top of that hidden directory.
*/
static struct unionfs_dentry_info *unionfs_parse_options(
- struct super_block *sb,
- char *options)
+ struct super_block *sb,
+ char *options)
{
struct unionfs_dentry_info *hidden_root_info;
char *optname;
@@ -659,14 +659,14 @@ static int unionfs_read_super(struct super_block *sb,
void *raw_data,
/* generate new uuids */
err = odf_update_uuids(odf, NULL, 0,
- hidden_root_info->lower_paths,
- hidden_root_info->bend -
hidden_root_info->bstart + 1);
+ hidden_root_info->lower_paths,
+ hidden_root_info->bend -
hidden_root_info->bstart + 1);
if (err)
goto out_free_odf;
err = odf_write_sb_data(odf,UNIONFS_SB(sb)->data,
- hidden_root_info->lower_paths,
- hidden_root_info->bend -
hidden_root_info->bstart + 1);
+ hidden_root_info->lower_paths,
+ hidden_root_info->bend -
hidden_root_info->bstart + 1);
if (err)
goto out_free_odf;
}
@@ -695,7 +695,7 @@ static int unionfs_read_super(struct super_block *sb, void
*raw_data,
}
}
if (high_bid > UNIONFS_SB(sb)->high_branch_id)
- UNIONFS_SB(sb)->high_branch_id = high_bid;
+ UNIONFS_SB(sb)->high_branch_id = high_bid;
/* max Bytes is the maximum bytes from highest priority branch */
unionfs_read_lock(sb);
@@ -747,7 +747,7 @@ static int unionfs_read_super(struct super_block *sb, void
*raw_data,
if (!err) {
/* its now ok to start the cleanup thread */
run_sioa(odf->cleanup, __odf_cleanup,
-
msecs_to_jiffies(odf->cleanup->cleanup.attr->timeout->val));
+
msecs_to_jiffies(odf->cleanup->cleanup.attr->timeout->val));
goto out;
}
/* else fall through */
diff --git a/fs/unionfs/odf.c b/fs/unionfs/odf.c
index cf5b0bc..a8fe3e4 100644
--- a/fs/unionfs/odf.c
+++ b/fs/unionfs/odf.c
@@ -199,7 +199,7 @@ int odf_read_super(struct super_block *sb, char *data)
sioa->cleanup.odf = osi;
sioa->cleanup.attr = get_attributes();
sioa->cleanup.flags = (options & ODF_OPT_KEEPCACHE)?
- ODF_CLEAN_DEFAULT:ODF_CLEAN_SR|ODF_CLEAN_FULL;
+ ODF_CLEAN_DEFAULT:ODF_CLEAN_SR|ODF_CLEAN_FULL;
osi->cleanup = sioa;
osi->mnt = nd.mnt;
mntget(osi->mnt);
@@ -474,8 +474,8 @@ int odf_rename(struct dentry *old_dentry, struct dentry
*new_dentry)
if (UNIONFS_D(old_dentry)->odf.dentry == NULL) {
printk("rename attempt %s to %s not in odf\n",
- old_dentry->d_name.name,
- new_dentry->d_name.name);
+ old_dentry->d_name.name,
+ new_dentry->d_name.name);
goto out;
}
err = odf_lookup(new_dentry->d_parent, new_dentry, 0);
@@ -490,9 +490,9 @@ int odf_rename(struct dentry *old_dentry, struct dentry
*new_dentry)
old_dir = old_odfdentry->d_parent;
new_dir = (UNIONFS_D(new_dentry->d_parent))->odf.dentry;
new_odfdentry = lookup_one_len(
- new_dentry->d_name.name,
- new_dir,
- new_dentry->d_name.len);
+ new_dentry->d_name.name,
+ new_dir,
+ new_dentry->d_name.len);
if (IS_ERR(new_odfdentry)) {
err = PTR_ERR(new_odfdentry);
goto out_unlock;
@@ -505,8 +505,8 @@ int odf_rename(struct dentry *old_dentry, struct dentry
*new_dentry)
current->fsuid = 0;
current->fsgid = 0;
err = vfs_rename(old_dir->d_inode,
- old_odfdentry, new_dir->d_inode,
- new_odfdentry);
+ old_odfdentry, new_dir->d_inode,
+ new_odfdentry);
unlock_rename(old_dir, new_dir);
current->fsuid = olduid;
current->fsgid = oldgid;
@@ -543,9 +543,9 @@ int odf_link(struct dentry *old_dentry, struct dentry
*new_dentry)
old_dir = old_odfdentry->d_parent;
new_dir = (UNIONFS_D(new_dentry->d_parent))->odf.dentry;
new_odfdentry = lookup_one_len(
- new_dentry->d_name.name,
- new_dir,
- new_dentry->d_name.len);
+ new_dentry->d_name.name,
+ new_dir,
+ new_dentry->d_name.len);
if (IS_ERR(new_odfdentry)) {
err = PTR_ERR(new_odfdentry);
goto out;
@@ -591,7 +591,7 @@ struct dentry *__link_add_dirent(struct file *link_file,
struct dentry *dentry)
link_file->f_pos = 0;
le32 = 0;
err = link_file->f_op->write(link_file, (char*)&le32,
- sizeof(__le32), &link_file->f_pos);
+ sizeof(__le32), &link_file->f_pos);
if (err != sizeof(__le32)){
err = -EIO;
goto out;
@@ -599,7 +599,7 @@ struct dentry *__link_add_dirent(struct file *link_file,
struct dentry *dentry)
le64 = 0;
err = link_file->f_op->write(link_file, (char*)&le64,
- sizeof(__le64), &link_file->f_pos);
+ sizeof(__le64), &link_file->f_pos);
if (err != sizeof(__le64)){
err = -EIO;
goto out;
@@ -613,7 +613,7 @@ struct dentry *__link_add_dirent(struct file *link_file,
struct dentry *dentry)
while (link_file->f_pos < size) {
err = link_file->f_op->read(link_file, (char*)&le32,
- sizeof(__le32), &link_file->f_pos);
+ sizeof(__le32),
&link_file->f_pos);
if (err != sizeof(__le32)){
err = -EIO;
goto out;
@@ -627,14 +627,14 @@ struct dentry *__link_add_dirent(struct file *link_file,
struct dentry *dentry)
goto out;
}
err = link_file->f_op->read(link_file, name,
- len, &link_file->f_pos);
+ len, &link_file->f_pos);
if (err != sizeof(len)){
err = -EIO;
goto out;
}
err = link_file->f_op->read(link_file, (char*)&le64,
- sizeof(__le64), &link_file->f_pos);
+ sizeof(__le64),
&link_file->f_pos);
if (err != sizeof(__le64)){
err = -EIO;
goto out;
@@ -643,8 +643,8 @@ struct dentry *__link_add_dirent(struct file *link_file,
struct dentry *dentry)
/* check if this is our dirent */
if (ino == dentry->d_parent->d_inode->i_ino &&
- dentry->d_name.len == len &&
- !strncmp(dentry->d_name.name, name, len)){
+ dentry->d_name.len == len &&
+ !strncmp(dentry->d_name.name, name, len)){
err = 0;
goto out;
}
@@ -655,14 +655,14 @@ struct dentry *__link_add_dirent(struct file *link_file,
struct dentry *dentry)
/* write the dirent in the file */
le32 = cpu_to_le32(dentry->d_name.len);
err = link_file->f_op->write(link_file, (char*)&le32,
- sizeof(__le32), &link_file->f_pos);
+ sizeof(__le32), &link_file->f_pos);
if (err != sizeof(__le32)){
err = -EIO;
goto out;
}
err = link_file->f_op->write(link_file, dentry->d_name.name,
- dentry->d_name.len, &link_file->f_pos);
+ dentry->d_name.len, &link_file->f_pos);
if (err != dentry->d_name.len){
err = -EIO;
goto out;
@@ -670,7 +670,7 @@ struct dentry *__link_add_dirent(struct file *link_file,
struct dentry *dentry)
le64 = cpu_to_le64(dentry->d_parent->d_inode->i_ino);
err = link_file->f_op->write(link_file, (char*)&le64,
- sizeof(__le64), &link_file->f_pos);
+ sizeof(__le64), &link_file->f_pos);
if (err != sizeof(__le64)){
err = -EIO;
goto out;
@@ -716,9 +716,9 @@ int odf_copyup_link(struct super_block *sb, struct dentry
*old_dentry,
/* update the old link info file with the copyup info */
uuid = odf_get_branch_uuid(osi, old_branch);
sprintf(name,"%x%x%x%x", *(unsigned int *) uuid,
- *(unsigned int *) uuid + 4,
- *(unsigned int *) uuid + 8,
- *(unsigned int *) uuid + 12);
+ *(unsigned int *) uuid + 4,
+ *(unsigned int *) uuid + 8,
+ *(unsigned int *) uuid + 12);
links = odf_ic_dentry(osi, old_dentry->d_inode->i_ino, name,
strlen(name));
if (IS_ERR(links)) {
err = PTR_ERR(links);
@@ -747,7 +747,7 @@ int odf_copyup_link(struct super_block *sb, struct dentry
*old_dentry,
/* 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);
+ sizeof(__le32), &link_file->f_pos);
if (err != sizeof(__le32)) {
err = -EIO;
set_fs(oldfs);
@@ -757,7 +757,7 @@ int odf_copyup_link(struct super_block *sb, struct dentry
*old_dentry,
/* write destination lower inode ino */
le64 = cpu_to_le64(new_dentry->d_inode->i_ino);
err = link_file->f_op->write(link_file, (char*)&le64,
- sizeof(__le64), &link_file->f_pos);
+ sizeof(__le64), &link_file->f_pos);
if (err != sizeof(__le64)) {
err = -EIO;
set_fs(oldfs);
@@ -803,7 +803,7 @@ int __check_link_copyup(struct file *link_file, struct
dentry *dentry,
link_file->f_pos = 0;
err = link_file->f_op->read(link_file, (char*)&le32,
- sizeof(__le32), &link_file->f_pos);
+ sizeof(__le32), &link_file->f_pos);
if (err == sizeof(__le32))
bid = le32_to_cpu(le32);
else if (err == 0)
@@ -814,7 +814,7 @@ int __check_link_copyup(struct file *link_file, struct
dentry *dentry,
}
err = link_file->f_op->read(link_file, (char*)&le64,
- sizeof(__le64), &link_file->f_pos);
+ sizeof(__le64), &link_file->f_pos);
if (err == sizeof(__le64))
ino = le64_to_cpu(le64);
else if (err != 0) {
@@ -850,7 +850,7 @@ skip:
link_file->f_pos = 0;
le32 = 0;
err = link_file->f_op->write(link_file, (char*)&le32,
- sizeof(__le32), &link_file->f_pos);
+ sizeof(__le32), &link_file->f_pos);
if (err != sizeof(__le32)){
set_fs(oldfs);
err = -EIO;
@@ -859,7 +859,7 @@ skip:
le64 = 0;
err = link_file->f_op->write(link_file, (char*)&le64,
- sizeof(__le64), &link_file->f_pos);
+ sizeof(__le64), &link_file->f_pos);
if (err != sizeof(__le64)){
set_fs(oldfs);
err = -EIO;
@@ -882,8 +882,8 @@ skip:
verify_locked(dentry->d_parent);
unionfs_unlock_dentry(dentry->d_parent); /*XXX: this is VERY
nasty */
lower_dentry = create_parents(dentry->d_parent->d_inode,
- dentry, dentry->d_name.name,
- branch_dst);
+ dentry, dentry->d_name.name,
+ branch_dst);
unionfs_lock_dentry(dentry->d_parent);
if (!lower_dentry || IS_ERR(lower_dentry)) {
@@ -993,19 +993,19 @@ int odf_lookup(struct dentry *parent, struct dentry
*dentry, int flags)
/* FIXME: modify this function to handle hardlinks */
if (bstart != -1 && lower_dentry && lower_dentry->d_inode &&
- lower_dentry->d_inode->i_nlink > 1 &&
- !S_ISDIR(lower_dentry->d_inode->i_mode) &&
- !(flags & ODF_LOOKUP_WH)) {
+ lower_dentry->d_inode->i_nlink > 1 &&
+ !S_ISDIR(lower_dentry->d_inode->i_mode) &&
+ !(flags & ODF_LOOKUP_WH)) {
/* get/create the link info file for lower fs */
name = kmalloc(UUID_LEN * 2 + 1,GFP_KERNEL);
uuid = odf_get_branch_uuid(osi, bstart);
sprintf(name,"%x%x%x%x", *(unsigned int *) uuid,
- *(unsigned int *) uuid + 4,
- *(unsigned int *) uuid + 8,
- *(unsigned int *) uuid + 12);
+ *(unsigned int *) uuid + 4,
+ *(unsigned int *) uuid + 8,
+ *(unsigned int *) uuid + 12);
links = odf_ic_dentry(osi, lower_dentry->d_inode->i_ino,
- name, strlen(name));
+ name, strlen(name));
kfree(name);
if (IS_ERR(links)) {
err = PTR_ERR(links);
@@ -1028,8 +1028,8 @@ 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
- __check_link_copyup(link_file, dentry, bstart);
- __link_add_dirent(link_file, dentry);
+ __check_link_copyup(link_file, dentry, bstart);
+ __link_add_dirent(link_file, dentry);
*/
}
@@ -1137,7 +1137,7 @@ struct dentry *__odf_lookup(struct dentry *parent,
if (name[0]=='.')
BUG_ON(len==1 || (name[1]=='.'&&len==2));
-retry:
+ retry:
/* FIXME need to check hardlinks before create */
if (link && (flags & ODF_LOOKUP_FILE)) {
/* link to the given dentry */
@@ -1175,8 +1175,8 @@ retry:
goto retry;
}
printk(KERN_WARNING
- "odf_lookup: could not create odf dentry %s,
%d\n",
- name, err);
+ "odf_lookup: could not create odf dentry %s,
%d\n",
+ name, err);
dput(odf_dentry);
odf_dentry = ERR_PTR(err);
goto out;
@@ -1318,7 +1318,7 @@ out:
* Write a dirent to the given file
*/
int odf_write_dirent(struct file *filp, const char *name, int namelen,
- u64 ino, unsigned int d_type)
+ u64 ino, unsigned int d_type)
{
int err = 0;
__le16 le16;
@@ -1333,34 +1333,34 @@ int odf_write_dirent(struct file *filp, const char
*name, int namelen,
/* odf dirent magic */
le32 = cpu_to_le32(ODF_DIRENT_MAGIC);
err = filp->f_op->write(filp, (char*)&le32,
- sizeof(__le32), &filp->f_pos);
+ sizeof(__le32), &filp->f_pos);
if (err != sizeof(__le32))
goto out;
/* inode */
le64 = cpu_to_le64(ino);
err = filp->f_op->write(filp, (char*)&le64,
- sizeof(__le64), &filp->f_pos);
+ sizeof(__le64), &filp->f_pos);
if (err != sizeof(__le64))
goto out;
/* name length */
le16 = cpu_to_le16(namelen);
err = filp->f_op->write(filp, (char*)&le16,
- sizeof(__le16), &filp->f_pos);
+ sizeof(__le16), &filp->f_pos);
if (err != sizeof(__le16))
goto out;
/* type */
byte = (unsigned char)d_type;
err =filp->f_op->write(filp, (char*)&byte,
- sizeof(unsigned char), &filp->f_pos);
+ sizeof(unsigned char), &filp->f_pos);
if (err != sizeof(unsigned char))
goto out;
/* name */
err = filp->f_op->write(filp, (char*)name,
- namelen, &filp->f_pos);
+ namelen, &filp->f_pos);
if (err != namelen)
goto out;
@@ -1376,7 +1376,7 @@ out:
* Reads the next dirent from the given file
*/
int odf_read_dirent(struct file *filp, char **name, int *namelen,
- u64 *ino, unsigned int *d_type)
+ u64 *ino, unsigned int *d_type)
{
int err = 0;
mm_segment_t oldfs;
@@ -1390,7 +1390,7 @@ int odf_read_dirent(struct file *filp, char **name, int
*namelen,
/* dirent magic */
err = filp->f_op->read(filp, (char*)&le32,
- sizeof(__le32), &filp->f_pos);
+ sizeof(__le32), &filp->f_pos);
if (err != sizeof(__le32)) {
err = -EIO;
goto out;
@@ -1404,7 +1404,7 @@ int odf_read_dirent(struct file *filp, char **name, int
*namelen,
/* inode */
err = filp->f_op->read(filp, (char*)&le64,
- sizeof(__le64), &filp->f_pos);
+ sizeof(__le64), &filp->f_pos);
if (err != sizeof(__le64)) {
err = -EIO;
goto out;
@@ -1413,7 +1413,7 @@ int odf_read_dirent(struct file *filp, char **name, int
*namelen,
/* name length */
err = filp->f_op->read(filp, (char*)&le16,
- sizeof(__le16), &filp->f_pos);
+ sizeof(__le16), &filp->f_pos);
if (err != sizeof(__le16)) {
err = -EIO;
goto out;
@@ -1426,7 +1426,7 @@ int odf_read_dirent(struct file *filp, char **name, int
*namelen,
/* type */
err = filp->f_op->read(filp, (char*)&byte,
- sizeof(unsigned char), &filp->f_pos);
+ sizeof(unsigned char), &filp->f_pos);
if (err != sizeof(unsigned char)) {
err = -EIO;
goto out;
@@ -1440,7 +1440,7 @@ int odf_read_dirent(struct file *filp, char **name, int
*namelen,
goto out;
}
err = filp->f_op->read(filp, (char*)(*name),
- *namelen, &filp->f_pos);
+ *namelen, &filp->f_pos);
if (err != *namelen) {
err = -EIO;
goto out;
@@ -1542,7 +1542,7 @@ int odf_remove(struct dentry *dentry, int flags)
rmv = 1;
}
else if (flags & ODF_RMV_NOTWH)
- rmv = 1;
+ rmv = 1;
if (!rmv)
goto out;
@@ -1886,9 +1886,9 @@ char *odf_read_sb_data(struct odf_sb_info *odf_sb, int
**bid)
/* check version - don't allow different than current */
if (version != ODF_VERSION) {
printk(KERN_ERR
- "unionfs: incompatible odf version "
- "(detected version %d, needed version %d)\n",
- version, ODF_VERSION);
+ "unionfs: incompatible odf version "
+ "(detected version %d, needed version %d)\n",
+ version, ODF_VERSION);
err = -EINVAL;
goto out_close;
}
@@ -2014,16 +2014,16 @@ void __odf_cleanup(void *args)
/* check if blocks is above threshold */
if (stat.f_bavail * 100 < stat.f_blocks
- * (100 - cl->attr->thresh_b_high->val)) {
+ * (100 - cl->attr->thresh_b_high->val)) {
cleanup = 1;
b_size = stat.f_blocks *
- (100 - cl->attr->thresh_b_low->val) -
- (stat.f_bavail * 100);
+ (100 - cl->attr->thresh_b_low->val) -
+ (stat.f_bavail * 100);
}
/* check if inodes is above threshold */
if (stat.f_ffree * 100 < stat.f_files
- * (100 - cl->attr->thresh_i_high->val)) {
+ * (100 - cl->attr->thresh_i_high->val)) {
cleanup = 1;
i_size = stat.f_files *
(100 - cl->attr->thresh_i_low->val) -
diff --git a/fs/unionfs/odf_internals.h b/fs/unionfs/odf_internals.h
index 046d8d5..77442ca 100644
--- a/fs/unionfs/odf_internals.h
+++ b/fs/unionfs/odf_internals.h
@@ -63,4 +63,3 @@ int odf_cleanup(struct odf_sb_info *odf, int mode, u64
b_to_free,
extern void generate_random_uuid(unsigned char uuid_out[16]);
#endif /* not _ODF_INTERNALS_H_ */
-
diff --git a/fs/unionfs/rename.c b/fs/unionfs/rename.c
index 31cf08a..ca7bd24 100644
--- a/fs/unionfs/rename.c
+++ b/fs/unionfs/rename.c
@@ -31,10 +31,10 @@ 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,
- dentry->d_name.name, bindex);
+ dentry->d_name.name, bindex);
if (!hidden_dentry || IS_ERR(hidden_dentry)) {
printk(KERN_DEBUG "hidden dentry NULL for "
- "bindex = %d\n", bindex);
+ "bindex = %d\n", bindex);
err = PTR_ERR(hidden_dentry);
goto out;
}
@@ -69,8 +69,8 @@ out:
}
static int __unionfs_rename(struct inode *old_dir, struct dentry *old_dentry,
- struct inode *new_dir, struct dentry *new_dentry,
- int bindex)
+ struct inode *new_dir, struct dentry *new_dentry,
+ int bindex)
{
int err = 0;
struct dentry *hidden_old_dentry;
@@ -208,21 +208,21 @@ static int do_unionfs_rename(struct inode *old_dir,
* is logically empty, so mkdir at branch 0 */
err = copyup_empty_dir(new_dir,
- new_dentry,
- old_dentry->d_inode->i_mode);
+ new_dentry,
+ old_dentry->d_inode->i_mode);
if (err)
goto revert;
}
else {
/* otherwise do regular copyup & rename */
err = copyup_dentry(old_dentry->d_parent->d_inode,
- old_dentry, old_bstart, bindex,
- old_dentry->d_name.name,
- old_dentry->d_name.len,
- NULL, old_dentry->d_inode->i_size);
+ old_dentry, old_bstart, bindex,
+ old_dentry->d_name.name,
+ old_dentry->d_name.len,
+ NULL, old_dentry->d_inode->i_size);
if (!err)
err = __unionfs_rename(old_dir, old_dentry,
new_dir,
- new_dentry, bindex);
+ new_dentry, bindex);
if (err)
goto revert;
}
@@ -246,7 +246,7 @@ static int do_unionfs_rename(struct inode *old_dir,
/* update the odf dir cache */
err = odf_purge_dir_cache(new_dentry->d_parent);
if (!err && old_dentry->d_parent != new_dentry->d_parent);
- err = odf_purge_dir_cache(old_dentry->d_parent);
+ err = odf_purge_dir_cache(old_dentry->d_parent);
BUG_ON(err);
out:
return err;
@@ -435,7 +435,7 @@ out:
* inode
*/
if (new_dentry->d_inode &&
- atomic_read(&new_dentry->d_inode->i_count) < 2) {
+ atomic_read(&new_dentry->d_inode->i_count) < 2) {
int bindex;
struct inode *i = new_dentry->d_inode;
for (bindex = ibstart(i); bindex <= ibend(i); bindex++)
{
diff --git a/fs/unionfs/super.c b/fs/unionfs/super.c
index 209ae3b..9f7a6c6 100644
--- a/fs/unionfs/super.c
+++ b/fs/unionfs/super.c
@@ -691,7 +691,7 @@ out_no_change:
/* first we need to update the uuids */
err = odf_update_uuids(odf, UNIONFS_D(sb->s_root)->lower_paths,
- cur_branches, new_lower_paths, new_branches );
+ cur_branches, new_lower_paths, new_branches );
if(err)
goto out_release;
@@ -701,7 +701,7 @@ out_no_change:
/* if odf_keepcache is not set, wake up the cleanup thread and force
* it to cleanup everything
- */
+ */
if (!odf_keepcache) {
odf->cleanup->cleanup.flags = ODF_CLEAN_FULL;
wake_up_and_wait_sioa(odf->cleanup);
diff --git a/fs/unionfs/union.h b/fs/unionfs/union.h
index b0c7e47..f5b0344 100644
--- a/fs/unionfs/union.h
+++ b/fs/unionfs/union.h
@@ -321,7 +321,7 @@ int unionfs_silly_rename(struct dentry *dentry, struct
dentry *hidden_dentry);
#define INTERPOSE_PARTIAL 4
extern struct dentry *unionfs_interpose(struct dentry *this_dentry,
- struct super_block *sb, int flag);
+ struct super_block *sb, int flag);
#ifdef CONFIG_UNION_FS_XATTR
/* Extended attribute functions. */
diff --git a/fs/unionfs/unlink.c b/fs/unionfs/unlink.c
index a3fc8e4..db8644e 100644
--- a/fs/unionfs/unlink.c
+++ b/fs/unionfs/unlink.c
@@ -59,8 +59,8 @@ static int unionfs_do_unlink(struct inode *dir, struct dentry
*dentry)
if (err) {
if (err == -EIO)
printk(KERN_WARNING
- "unionfs_unlink: IO error unlinking from branch
%d\n",
- bindex);
+ "unionfs_unlink: IO error unlinking from branch
%d\n",
+ bindex);
err = odf_create_wh(dentry);
if (err)
goto out;
@@ -173,8 +173,8 @@ static int unionfs_do_rmdir(struct inode *dir, struct
dentry *dentry)
if (err || odf_get_opaque(dentry) != 1) {
if (err == -EIO)
printk(KERN_WARNING
- "unionfs_rmdir: IO error removing from branch
%d\n",
- bindex);
+ "unionfs_rmdir: IO error removing from branch
%d\n",
+ bindex);
err = odf_create_wh(dentry);
if (err)
goto out;
diff --git a/include/linux/union_fs.h b/include/linux/union_fs.h
index c70feda..6a1a702 100644
--- a/include/linux/union_fs.h
+++ b/include/linux/union_fs.h
@@ -26,4 +26,3 @@
#define MAY_NFSRO 16
#endif /* not _LINUX_UNIONFS_H */
-
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs