summaryrefslogtreecommitdiffstats
path: root/fs/exec.c
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2005-11-07 00:59:49 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 07:53:42 -0800
commitcc4e69dee4a080f6eae3f410daec2593f4fa6f00 (patch)
treeb9be8984a0be5f7997d836603963dcf8f2e728ff /fs/exec.c
parent481bed454247538e9f57d4ea37b153ccba24ba7b (diff)
downloadop-kernel-dev-cc4e69dee4a080f6eae3f410daec2593f4fa6f00.zip
op-kernel-dev-cc4e69dee4a080f6eae3f410daec2593f4fa6f00.tar.gz
[PATCH] VFS: pass file pointer to filesystem from ftruncate()
This patch extends the iattr structure with a file pointer memeber, and adds an ATTR_FILE validity flag for this member. This is set if do_truncate() is invoked from ftruncate() or from do_coredump(). The change is source and binary compatible. Signed-off-by: Miklos Szeredi <miklos@szeredi.hu> 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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/exec.c b/fs/exec.c
index ce76b33..cd6c574 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1511,7 +1511,7 @@ int do_coredump(long signr, int exit_code, struct pt_regs * regs)
goto close_fail;
if (!file->f_op->write)
goto close_fail;
- if (do_truncate(file->f_dentry, 0) != 0)
+ if (do_truncate(file->f_dentry, 0, file) != 0)
goto close_fail;
retval = binfmt->core_dump(signr, regs, file);
OpenPOWER on IntegriCloud