fs: overlayfs: remove debug parameter
Subsystems (2)
PATCH 1/1 fs: overlayfs: remove debug parameter
pr_debug is handling whether or not to print debug statements so drop the bool debug parameter.
Signed-off-by Antonio Murdaca <[email protected]>
--- fs/overlayfs/copy_up.c | 2 +- fs/overlayfs/dir.c | 18 +++++++++--------- fs/overlayfs/overlayfs.h | 31 +++++++++++-------------------- fs/overlayfs/super.c | 2 +- 4 files changed, 22 insertions(+), 31 deletions(-)
fs/overlayfs/copy_up.c +1 -1
@@ -260,7 +260,7 @@ static int ovl_copy_up_locked(struct dentry *workdir, struct dentry *upperdir,/* Can't properly set mode on creation because of the umask */ stat->mode &=S_IFMT ; - err =ovl_create_real (wdir, newdentry, stat, link,NULL , true); + err =ovl_create_real (wdir, newdentry, stat, link,NULL ); stat->mode = mode;if (err) goto out2;
fs/overlayfs/dir.c +9 -9
@@ -71,7 +71,7 @@ static struct dentry *ovl_whiteout(struct dentry *workdir,int ovl_create_real (struct inode *dir,struct dentry *newdentry,struct kstat *stat,const char *link, -struct dentry *hardlink,bool debug) +struct dentry *hardlink) {int err;
@@ -79,15 +79,15 @@ int ovl_create_real(struct inode *dir, struct dentry *newdentry,return -ESTALE ;if (hardlink) { - err =ovl_do_link (hardlink, dir, newdentry, debug); + err =ovl_do_link (hardlink, dir, newdentry); }else {switch (stat->mode &S_IFMT ) {case S_IFREG : - err =ovl_do_create (dir, newdentry, stat->mode, debug); + err =ovl_do_create (dir, newdentry, stat->mode);break ;case S_IFDIR : - err =ovl_do_mkdir (dir, newdentry, stat->mode, debug); + err =ovl_do_mkdir (dir, newdentry, stat->mode);break ;case S_IFCHR :
@@ -95,11 +95,11 @@ int ovl_create_real(struct inode *dir, struct dentry *newdentry,case S_IFIFO :case S_IFSOCK : err =ovl_do_mknod (dir, newdentry, - stat->mode, stat->rdev, debug); + stat->mode, stat->rdev);break ;case S_IFLNK : - err =ovl_do_symlink (dir, newdentry, link, debug); + err =ovl_do_symlink (dir, newdentry, link);break ;default :
@@ -173,7 +173,7 @@ static int ovl_create_upper(struct dentry *dentry, struct inode *inode, err =PTR_ERR (newdentry);if (IS_ERR (newdentry)) goto out_unlock; - err =ovl_create_real (udir, newdentry, stat, link, hardlink, false); + err =ovl_create_real (udir, newdentry, stat, link, hardlink);if (err) goto out_dput;
@@ -246,7 +246,7 @@ static struct dentry *ovl_clear_empty(struct dentry *dentry,if (IS_ERR (opaquedir)) goto out_unlock; - err =ovl_create_real (wdir, opaquedir, &stat,NULL ,NULL , true); + err =ovl_create_real (wdir, opaquedir, &stat,NULL ,NULL );if (err) goto out_dput;
@@ -343,7 +343,7 @@ static int ovl_create_over_whiteout(struct dentry *dentry, struct inode *inode,if (IS_ERR (upper)) goto out_dput; - err =ovl_create_real (wdir, newdentry, stat, link, hardlink, true); + err =ovl_create_real (wdir, newdentry, stat, link, hardlink);if (err) goto out_dput2;
fs/overlayfs/overlayfs.h +11 -20
@@ -42,51 +42,42 @@ static inline int ovl_do_unlink(struct inode *dir, struct dentry *dentry) }static inline int ovl_do_link (struct dentry *old_dentry,struct inode *dir, -struct dentry *new_dentry,bool debug) +struct dentry *new_dentry) {int err =vfs_link (old_dentry, dir, new_dentry,NULL ); -if (debug) { -pr_debug ("link(%pd2, %pd2) = %i\n" , - old_dentry, new_dentry, err); - } +pr_debug ("link(%pd2, %pd2) = %i\n" , old_dentry, new_dentry, err);return err; }static inline int ovl_do_create (struct inode *dir,struct dentry *dentry, -umode_t mode,bool debug) +umode_t mode) {int err =vfs_create (dir, dentry, mode, true); -if (debug) -pr_debug ("create(%pd2, 0%o) = %i\n" , dentry, mode, err); +pr_debug ("create(%pd2, 0%o) = %i\n" , dentry, mode, err);return err; }static inline int ovl_do_mkdir (struct inode *dir,struct dentry *dentry, -umode_t mode,bool debug) +umode_t mode) {int err =vfs_mkdir (dir, dentry, mode); -if (debug) -pr_debug ("mkdir(%pd2, 0%o) = %i\n" , dentry, mode, err); +pr_debug ("mkdir(%pd2, 0%o) = %i\n" , dentry, mode, err);return err; }static inline int ovl_do_mknod (struct inode *dir,struct dentry *dentry, -umode_t mode,dev_t dev,bool debug) +umode_t mode,dev_t dev) {int err =vfs_mknod (dir, dentry, mode, dev); -if (debug) { -pr_debug ("mknod(%pd2, 0%o, 0%o) = %i\n" , - dentry, mode, dev, err); - } +pr_debug ("mknod(%pd2, 0%o, 0%o) = %i\n" , dentry, mode, dev, err);return err; }static inline int ovl_do_symlink (struct inode *dir,struct dentry *dentry, -const char *oldname,bool debug) +const char *oldname) {int err =vfs_symlink (dir, dentry, oldname); -if (debug) -pr_debug ("symlink(\"%s\", %pd2) = %i\n" , oldname, dentry, err); +pr_debug ("symlink(\"%s\", %pd2) = %i\n" , oldname, dentry, err);return err; }
@@ -192,7 +183,7 @@ extern const struct inode_operations ovl_dir_inode_operations;struct dentry *ovl_lookup_temp (struct dentry *workdir,struct dentry *dentry);int ovl_create_real (struct inode *dir,struct dentry *newdentry,struct kstat *stat,const char *link, -struct dentry *hardlink,bool debug); +struct dentry *hardlink);void ovl_cleanup (struct inode *dir,struct dentry *dentry);/* copy_up.c */
fs/overlayfs/super.c +1 -1
@@ -801,7 +801,7 @@ retry: goto retry; } - err =ovl_create_real (dir, work, &stat,NULL ,NULL , true); + err =ovl_create_real (dir, work, &stat,NULL ,NULL );if (err) goto out_dput; }
Signature · 1 line
2.5.5