* Copyright (c) 2003 Puja Gupta
* Copyright (c) 2003 Harikesavan Krishnan
* Copyright (c) 2003-2007 Stony Brook University
- * Copyright (c) 2003-2007 The Research Foundation of State University of New York
+ * Copyright (c) 2003-2007 The Research Foundation of SUNY
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* Copyright (c) 2003 Puja Gupta
* Copyright (c) 2003 Harikesavan Krishnan
* Copyright (c) 2003-2007 Stony Brook University
- * Copyright (c) 2003-2007 The Research Foundation of State University of New York
+ * Copyright (c) 2003-2007 The Research Foundation of SUNY
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* Copyright (c) 2003 Puja Gupta
* Copyright (c) 2003 Harikesavan Krishnan
* Copyright (c) 2003-2007 Stony Brook University
- * Copyright (c) 2003-2007 The Research Foundation of State University of New York*
+ * Copyright (c) 2003-2007 The Research Foundation of SUNY
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
return err;
}
-/* This function replicates the directory structure upto given dentry
- * in the bindex branch. Can create directory structure recursively to the right
+/* This function replicates the directory structure upto given dentry in the
+ * bindex branch. Can create directory structure recursively to the right
* also.
*/
struct dentry *create_parents(struct inode *dir, struct dentry *dentry,
* Copyright (c) 2003 Puja Gupta
* Copyright (c) 2003 Harikesavan Krishnan
* Copyright (c) 2003-2007 Stony Brook University
- * Copyright (c) 2003-2007 The Research Foundation of State University of New York
+ * Copyright (c) 2003-2007 The Research Foundation of SUNY
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* the child may not yet be valid.
* Returns 1 if valid, 0 otherwise.
*/
-static int __unionfs_d_revalidate_one(struct dentry *dentry, struct nameidata *nd)
+static int __unionfs_d_revalidate_one(struct dentry *dentry,
+ struct nameidata *nd)
{
int valid = 1; /* default is valid (1); invalid is 0. */
struct dentry *hidden_dentry;
* Copyright (c) 2003 Puja Gupta
* Copyright (c) 2003 Harikesavan Krishnan
* Copyright (c) 2003-2007 Stony Brook University
- * Copyright (c) 2003-2007 The Research Foundation of State University of New York
+ * Copyright (c) 2003-2007 The Research Foundation of SUNY
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* Copyright (c) 2003 Puja Gupta
* Copyright (c) 2003 Harikesavan Krishnan
* Copyright (c) 2003-2007 Stony Brook University
- * Copyright (c) 2003-2007 The Research Foundation of State University of New York
+ * Copyright (c) 2003-2007 The Research Foundation of SUNY
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* Copyright (c) 2003 Puja Gupta
* Copyright (c) 2003 Harikesavan Krishnan
* Copyright (c) 2003-2007 Stony Brook University
- * Copyright (c) 2003-2007 The Research Foundation of State University of New York
+ * Copyright (c) 2003-2007 The Research Foundation of SUNY
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
return UNIONFS_F(f)->lower_files[fbstart(f)];
}
-static inline struct file *unionfs_lower_file_idx(const struct file *f, int index)
+static inline struct file *unionfs_lower_file_idx(const struct file *f,
+ int index)
{
return UNIONFS_F(f)->lower_files[index];
}
-static inline void unionfs_set_lower_file_idx(struct file *f, int index, struct file *val)
+static inline void unionfs_set_lower_file_idx(struct file *f, int index,
+ struct file *val)
{
UNIONFS_F(f)->lower_files[index] = val;
/* save branch ID (may be redundant?) */
return UNIONFS_I(i)->lower_inodes[ibstart(i)];
}
-static inline struct inode *unionfs_lower_inode_idx(const struct inode *i, int index)
+static inline struct inode *unionfs_lower_inode_idx(const struct inode *i,
+ int index)
{
return UNIONFS_I(i)->lower_inodes[index];
}
}
/* Superblock to lower superblock. */
-static inline struct super_block *unionfs_lower_super(const struct super_block *sb)
+static inline struct super_block *unionfs_lower_super(
+ 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)
+static inline struct super_block *unionfs_lower_super_idx(
+ const struct super_block *sb,
+ int index)
{
return UNIONFS_SB(sb)->data[index].sb;
}
-static inline void unionfs_set_lower_super_idx(struct super_block *sb, int index,
+static inline void unionfs_set_lower_super_idx(struct super_block *sb,
+ int index,
struct super_block *val)
{
UNIONFS_SB(sb)->data[index].sb = val;
}
-static inline void unionfs_set_lower_super(struct super_block *sb, struct super_block *val)
+static inline void unionfs_set_lower_super(struct super_block *sb,
+ struct super_block *val)
{
UNIONFS_SB(sb)->data[sbstart(sb)].sb = val;
}
UNIONFS_D(dent)->lower_paths[index].dentry = val;
}
-static inline struct dentry *unionfs_lower_dentry_idx(const struct dentry *dent, int index)
+static inline struct dentry *unionfs_lower_dentry_idx(
+ const struct dentry *dent,
+ int index)
{
return UNIONFS_D(dent)->lower_paths[index].dentry;
}
UNIONFS_D(dent)->lower_paths[index].mnt = mnt;
}
-static inline struct vfsmount *unionfs_lower_mnt_idx(const struct dentry *dent, int index)
+static inline struct vfsmount *unionfs_lower_mnt_idx(
+ const struct dentry *dent,
+ int index)
{
return UNIONFS_D(dent)->lower_paths[index].mnt;
}
* Copyright (c) 2003 Puja Gupta
* Copyright (c) 2003 Harikesavan Krishnan
* Copyright (c) 2003-2007 Stony Brook University
- * Copyright (c) 2003-2007 The Research Foundation of State University of New York
+ * Copyright (c) 2003-2007 The Research Foundation of SUNY
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
return err;
}
-static int unionfs_fsync(struct file *file, struct dentry *dentry, int datasync)
+static int unionfs_fsync(struct file *file, struct dentry *dentry,
+ int datasync)
{
int err;
struct file *hidden_file = NULL;
* Copyright (c) 2003 Puja Gupta
* Copyright (c) 2003 Harikesavan Krishnan
* Copyright (c) 2003-2007 Stony Brook University
- * Copyright (c) 2003-2007 The Research Foundation of State University of New York
+ * Copyright (c) 2003-2007 The Research Foundation of SUNY
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* security_inode_permission, and therefore security inside SELinux, etc.
* are performed.
*/
-static int inode_permission(struct inode *inode, int mask, struct nameidata *nd,
- int bindex)
+static int inode_permission(struct inode *inode, int mask,
+ struct nameidata *nd, int bindex)
{
int retval, submask;
* Copyright (c) 2003 Puja Gupta
* Copyright (c) 2003 Harikesavan Krishnan
* Copyright (c) 2003-2007 Stony Brook University
- * Copyright (c) 2003-2007 The Research Foundation of State University of New York
+ * Copyright (c) 2003-2007 The Research Foundation of SUNY
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
return err;
}
-struct dentry *unionfs_lookup_backend(struct dentry *dentry, struct nameidata *nd,
- int lookupmode)
+struct dentry *unionfs_lookup_backend(struct dentry *dentry,
+ struct nameidata *nd, int lookupmode)
{
int err = 0;
struct dentry *hidden_dentry = NULL;
first_dentry = dentry;
first_hidden_mnt = unionfs_mntget(dentry, bindex);
}
- unionfs_set_lower_dentry_idx(dentry, first_dentry_offset, first_hidden_dentry);
- unionfs_set_lower_mnt_idx(dentry, first_dentry_offset, first_hidden_mnt);
+ unionfs_set_lower_dentry_idx(dentry, first_dentry_offset,
+ first_hidden_dentry);
+ unionfs_set_lower_mnt_idx(dentry, first_dentry_offset,
+ first_hidden_mnt);
set_dbstart(dentry, first_dentry_offset);
set_dbend(dentry, first_dentry_offset);
* Copyright (c) 2003 Puja Gupta
* Copyright (c) 2003 Harikesavan Krishnan
* Copyright (c) 2003-2007 Stony Brook University
- * Copyright (c) 2003-2007 The Research Foundation of State University of New York
+ * Copyright (c) 2003-2007 The Research Foundation of SUNY
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* Returns the dentry object of the lower-level (hidden) directory;
* 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)
+static struct unionfs_dentry_info *unionfs_parse_options(
+ struct super_block *sb,
+ char *options)
{
struct unionfs_dentry_info *hidden_root_info;
char *optname;
* Copyright (c) 2003 Puja Gupta
* Copyright (c) 2003 Harikesavan Krishnan
* Copyright (c) 2003-2007 Stony Brook University
- * Copyright (c) 2003-2007 The Research Foundation of State University of New York
+ * Copyright (c) 2003-2007 The Research Foundation of SUNY
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* Copyright (c) 2003 Puja Gupta
* Copyright (c) 2003 Harikesavan Krishnan
* Copyright (c) 2003-2007 Stony Brook University
- * Copyright (c) 2003-2007 The Research Foundation of State University of New York
+ * Copyright (c) 2003-2007 The Research Foundation of SUNY
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* Copyright (c) 2003 Puja Gupta
* Copyright (c) 2003 Harikesavan Krishnan
* Copyright (c) 2003-2007 Stony Brook University
- * Copyright (c) 2003-2007 The Research Foundation of State University of New York
+ * Copyright (c) 2003-2007 The Research Foundation of SUNY
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* Copyright (c) 2003 Puja Gupta
* Copyright (c) 2003 Harikesavan Krishnan
* Copyright (c) 2003-2007 Stony Brook University
- * Copyright (c) 2003-2007 The Research Foundation of State University of New York
+ * Copyright (c) 2003-2007 The Research Foundation of SUNY
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* Copyright (c) 2003 Puja Gupta
* Copyright (c) 2003 Harikesavan Krishnan
* Copyright (c) 2003-2007 Stony Brook University
- * Copyright (c) 2003-2007 The Research Foundation of State University of New York
+ * Copyright (c) 2003-2007 The Research Foundation of SUNY
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* Copyright (c) 2003 Puja Gupta
* Copyright (c) 2003 Harikesavan Krishnan
* Copyright (c) 2003-2007 Stony Brook University
- * Copyright (c) 2003-2007 The Research Foundation of State University of New York
+ * Copyright (c) 2003-2007 The Research Foundation of SUNY
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
extern int copyup_dentry(struct inode *dir, struct dentry *dentry, int bstart,
int new_bindex, struct file **copyup_file, loff_t len);
-extern int remove_whiteouts(struct dentry *dentry, struct dentry *hidden_dentry,
- int bindex);
+extern int remove_whiteouts(struct dentry *dentry,
+ struct dentry *hidden_dentry, int bindex);
extern int do_delete_whiteouts(struct dentry *dentry, int bindex,
struct unionfs_dir_state *namelist);
#define INTERPOSE_REVAL_NEG 3
#define INTERPOSE_PARTIAL 4
-extern int unionfs_interpose(struct dentry *this_dentry, struct super_block *sb,
- int flag);
+extern int unionfs_interpose(struct dentry *this_dentry,
+ struct super_block *sb, int flag);
/* Branch management ioctls. */
int unionfs_ioctl_incgen(struct file *file, unsigned int cmd,
return d_unhashed(d) && (d != d->d_sb->s_root);
}
-struct dentry *unionfs_lookup_backend(struct dentry *dentry, struct nameidata *nd, int lookupmode);
+struct dentry *unionfs_lookup_backend(struct dentry *dentry,
+ struct nameidata *nd, int lookupmode);
/* unionfs_permission, check if we should bypass error to facilitate copyup */
#define IS_COPYUP_ERR(err) ((err) == -EROFS)
extern int __parse_branch_mode(const char *name);
extern int parse_branch_mode(const char *name);
-/* These two functions are here because it is kind of daft to copy and paste the
- * contents of the two functions to 32+ places in unionfs
+/* These two functions are here because it is kind of daft to copy and paste
+ * the contents of the two functions to 32+ places in unionfs
*/
static inline struct dentry *lock_parent(struct dentry *dentry)
{
extern int make_dir_opaque(struct dentry *dir, int bindex);
-static inline struct vfsmount *unionfs_mntget(struct dentry *dentry, int bindex)
+static inline struct vfsmount *unionfs_mntget(struct dentry *dentry,
+ int bindex)
{
struct vfsmount *mnt;
if (!dentry) {
* Copyright (c) 2003 Puja Gupta
* Copyright (c) 2003 Harikesavan Krishnan
* Copyright (c) 2003-2007 Stony Brook University
- * Copyright (c) 2003-2007 The Research Foundation of State University of New York
+ * Copyright (c) 2003-2007 The Research Foundation of SUNY
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* Copyright (c) 2003 Puja Gupta
* Copyright (c) 2003 Harikesavan Krishnan
* Copyright (c) 2003-2007 Stony Brook University
- * Copyright (c) 2003-2007 The Research Foundation of State University of New York*
+ * Copyright (c) 2003-2007 The Research Foundation of SUNY
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
/* BKL held by caller.
* dentry->d_inode->i_mutex locked
*/
-int unionfs_setxattr(struct dentry *dentry, const char *name, const void *value,
- size_t size, int flags)
+int unionfs_setxattr(struct dentry *dentry, const char *name,
+ const void *value, size_t size, int flags)
{
struct dentry *hidden_dentry = NULL;
int err = -EOPNOTSUPP;