[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>
This commit is contained in:
Miklos Szeredi
2005-11-07 00:59:49 -08:00
committed by Linus Torvalds
parent 481bed4542
commit cc4e69dee4
4 changed files with 18 additions and 6 deletions

View File

@@ -1459,7 +1459,7 @@ int may_open(struct nameidata *nd, int acc_mode, int flag)
if (!error) {
DQUOT_INIT(inode);
error = do_truncate(dentry, 0);
error = do_truncate(dentry, 0, NULL);
}
put_write_access(inode);
if (error)