From: Erez Zadok Date: Tue, 13 Jan 2009 03:01:15 +0000 (-0500) Subject: Unionfs: dentry_open takes a struct cred now X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=59967b8710cc46867b60cb5e59ea299aa501543c;p=unionfs-2.6.39.y.git Unionfs: dentry_open takes a struct cred now Signed-off-by: Erez Zadok --- diff --git a/fs/unionfs/commonfops.c b/fs/unionfs/commonfops.c index ed3604e4ea7..1f017372734 100644 --- a/fs/unionfs/commonfops.c +++ b/fs/unionfs/commonfops.c @@ -178,7 +178,7 @@ static int open_all_files(struct file *file) lower_file = dentry_open(lower_dentry, unionfs_lower_mnt_idx(dentry, bindex), - file->f_flags); + file->f_flags, current_cred()); if (IS_ERR(lower_file)) { branchput(sb, bindex); err = PTR_ERR(lower_file); @@ -223,7 +223,7 @@ static int open_highest_file(struct file *file, bool willwrite) unionfs_mntget(dentry, bstart); lower_file = dentry_open(lower_dentry, unionfs_lower_mnt_idx(dentry, bstart), - file->f_flags); + file->f_flags, current_cred()); if (IS_ERR(lower_file)) { err = PTR_ERR(lower_file); goto out; @@ -457,7 +457,8 @@ static int __open_dir(struct inode *inode, struct file *file) dget(lower_dentry); unionfs_mntget(file->f_path.dentry, bindex); mnt = unionfs_lower_mnt_idx(file->f_path.dentry, bindex); - lower_file = dentry_open(lower_dentry, mnt, file->f_flags); + lower_file = dentry_open(lower_dentry, mnt, file->f_flags, + current_cred()); if (IS_ERR(lower_file)) return PTR_ERR(lower_file); @@ -528,7 +529,7 @@ static int __open_file(struct inode *inode, struct file *file, lower_file = dentry_open(lower_dentry, unionfs_lower_mnt_idx(file->f_path.dentry, bstart), - lower_flags); + lower_flags, current_cred()); if (IS_ERR(lower_file)) return PTR_ERR(lower_file); diff --git a/fs/unionfs/copyup.c b/fs/unionfs/copyup.c index ae6ea2bea30..28f897c9be4 100644 --- a/fs/unionfs/copyup.c +++ b/fs/unionfs/copyup.c @@ -240,7 +240,7 @@ static int __copyup_reg_data(struct dentry *dentry, /* dentry_open calls dput and mntput if it returns an error */ input_file = dentry_open(old_lower_dentry, unionfs_lower_mnt_idx(dentry, old_bindex), - O_RDONLY | O_LARGEFILE); + O_RDONLY | O_LARGEFILE, current_cred()); if (IS_ERR(input_file)) { dput(old_lower_dentry); err = PTR_ERR(input_file); @@ -256,7 +256,7 @@ static int __copyup_reg_data(struct dentry *dentry, output_mnt = unionfs_mntget(sb->s_root, new_bindex); branchget(sb, new_bindex); output_file = dentry_open(new_lower_dentry, output_mnt, - O_RDWR | O_LARGEFILE); + O_RDWR | O_LARGEFILE, current_cred()); if (IS_ERR(output_file)) { err = PTR_ERR(output_file); goto out_close_in2; diff --git a/fs/unionfs/dirhelper.c b/fs/unionfs/dirhelper.c index aa31e9161c2..0e1e5e36278 100644 --- a/fs/unionfs/dirhelper.c +++ b/fs/unionfs/dirhelper.c @@ -120,7 +120,7 @@ int check_empty(struct dentry *dentry, struct dentry *parent, dget(lower_dentry); mnt = unionfs_mntget(dentry, bindex); branchget(sb, bindex); - lower_file = dentry_open(lower_dentry, mnt, O_RDONLY); + lower_file = dentry_open(lower_dentry, mnt, O_RDONLY, current_cred()); if (IS_ERR(lower_file)) { err = PTR_ERR(lower_file); branchput(sb, bindex);