Re: [ANNOUNCEMENT PATCH COW] proof of concept impementation of cowlinks

From: Jan Harkes
Date: Tue May 11 2004 - 09:20:01 EST


Forgot a somewhat useful line there,

On Tue, May 11, 2004 at 10:08:53AM -0400, Jan Harkes wrote:
> int my_file_sendfile(struct file *in_file, loff_t *ppos, size_t count,
> read_actor_t actor, void __user *target)
> {
> struct file *out_file = NULL;
>
> /* We have to check the read_actor callback function to see if the
> * target actually points at a struct file. */
> if (actor != file_send_actor)
> goto copy_local;

out_file = (struct file *)target;

> /* are both source and destination within the same file system
> * mountpoint? */
> if (in_file->f_dentry->d_inode->i_sb != out_file->f_dentry->d_inode->i_sb)
> goto copy_local;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/