aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exec.c
diff options
context:
space:
mode:
authorJosef "Jeff" Sipek <jsipek@cs.sunysb.edu>2006-12-08 05:36:35 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 11:28:41 -0500
commit0f7fc9e4d03987fe29f6dd4aa67e4c56eb7ecb05 (patch)
tree51763269e44eb9bf4d0f8c529577489902850cf9 /fs/exec.c
parentb65d34fd465f19fbe2f32f2205a9a06ca7c2bdeb (diff)
[PATCH] VFS: change struct file to use struct path
This patch changes struct file to use struct path instead of having independent pointers to struct dentry and struct vfsmount, and converts all users of f_{dentry,vfsmnt} in fs/ to use f_path.{dentry,mnt}. Additionally, it adds two #define's to make the transition easier for users of the f_dentry and f_vfsmnt. Signed-off-by: Josef "Jeff" Sipek <jsipek@cs.sunysb.edu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/exec.c b/fs/exec.c
index add0e03c3ea9..60433e2254a4 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -912,7 +912,7 @@ EXPORT_SYMBOL(flush_old_exec);
912int prepare_binprm(struct linux_binprm *bprm) 912int prepare_binprm(struct linux_binprm *bprm)
913{ 913{
914 int mode; 914 int mode;
915 struct inode * inode = bprm->file->f_dentry->d_inode; 915 struct inode * inode = bprm->file->f_path.dentry->d_inode;
916 int retval; 916 int retval;
917 917
918 mode = inode->i_mode; 918 mode = inode->i_mode;
@@ -922,7 +922,7 @@ int prepare_binprm(struct linux_binprm *bprm)
922 bprm->e_uid = current->euid; 922 bprm->e_uid = current->euid;
923 bprm->e_gid = current->egid; 923 bprm->e_gid = current->egid;
924 924
925 if(!(bprm->file->f_vfsmnt->mnt_flags & MNT_NOSUID)) { 925 if(!(bprm->file->f_path.mnt->mnt_flags & MNT_NOSUID)) {
926 /* Set-uid? */ 926 /* Set-uid? */
927 if (mode & S_ISUID) { 927 if (mode & S_ISUID) {
928 current->personality &= ~PER_CLEAR_ON_SETID; 928 current->personality &= ~PER_CLEAR_ON_SETID;
@@ -1519,10 +1519,10 @@ int do_coredump(long signr, int exit_code, struct pt_regs * regs)
1519 0600); 1519 0600);
1520 if (IS_ERR(file)) 1520 if (IS_ERR(file))
1521 goto fail_unlock; 1521 goto fail_unlock;
1522 inode = file->f_dentry->d_inode; 1522 inode = file->f_path.dentry->d_inode;
1523 if (inode->i_nlink > 1) 1523 if (inode->i_nlink > 1)
1524 goto close_fail; /* multiple links - don't dump */ 1524 goto close_fail; /* multiple links - don't dump */
1525 if (!ispipe && d_unhashed(file->f_dentry)) 1525 if (!ispipe && d_unhashed(file->f_path.dentry))
1526 goto close_fail; 1526 goto close_fail;
1527 1527
1528 /* AK: actually i see no reason to not allow this for named pipes etc., 1528 /* AK: actually i see no reason to not allow this for named pipes etc.,
@@ -1533,7 +1533,7 @@ int do_coredump(long signr, int exit_code, struct pt_regs * regs)
1533 goto close_fail; 1533 goto close_fail;
1534 if (!file->f_op->write) 1534 if (!file->f_op->write)
1535 goto close_fail; 1535 goto close_fail;
1536 if (!ispipe && do_truncate(file->f_dentry, 0, 0, file) != 0) 1536 if (!ispipe && do_truncate(file->f_path.dentry, 0, 0, file) != 0)
1537 goto close_fail; 1537 goto close_fail;
1538 1538
1539 retval = binfmt->core_dump(signr, regs, file); 1539 retval = binfmt->core_dump(signr, regs, file);