VFS: Make more complete truncate operation available to CacheFiles

Make a more complete truncate operation available to CacheFiles (including
security checks and suchlike) so that it can use this to clear invalidated
cache files.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
David Howells
2012-12-20 21:52:36 +00:00
parent ef778e7ae6
commit a02de96085
2 changed files with 28 additions and 23 deletions

View File

@@ -1999,6 +1999,7 @@ struct filename {
bool separate; /* should "name" be freed? */
};
extern long vfs_truncate(struct path *, loff_t);
extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs,
struct file *filp);
extern int do_fallocate(struct file *file, int mode, loff_t offset,