Cc: Andrew Morton <akpm@...>, Alexander Viro <viro@...>, Christoph Hellwig <hch@...>, Roman Zippel <zippel@...>, Mikulas Patocka <mikulas@...>, David Woodhouse <dwmw2@...>, Dave Kleikamp <shaggy@...>, Anton Altaparmakov <aia21@...>, Evgeniy Dushistov <dushistov@...>, <linux-kernel@...>, <linux-fsdevel@...>, <reiserfs-dev@...>
On 4/12/07, David Howells <dhowells@redhat.com> wrote:
But you can't mmap() a directory anyway so ... oh. Interesting.
afs_file_readpage() does directories too. The only thing I can think
of then is
struct address_space_operations afs_file_aops = {
.readpage = afs_file_readpage,
}
struct address_space_operations afs_dir_aops = {
.readpage = afs_key_readpage,
}
int afs_file_readpage(file, page){
return afs_key_readpage(file->private, page)
}
but that's a lot of code to avoid a single stack allocation. The
whole fake file pointer thing still strikes me as a little ugly, and
you're definitely not the first one who needed this sort of hackery.
ugh
NATE
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html