Messages in this thread | | | From | David Howells <> | Subject | Re: [PATCH 2/9] vfs: export do_splice_direct() to modules | Date | Wed, 20 Mar 2013 12:30:49 +0000 |
| |
Al Viro <viro@ZenIV.linux.org.uk> wrote:
> fs/cachefiles/rdwr.c:967: ret = file->f_op->write( > > cachefiles_write_page(); no fucking idea what locks might be held by caller > and potentially that's a rather nasty source of PITA
The caller of cachefiles_write_page() (ie. fscache_write_op()) holds no locks over the call.
__fscache_write_page() queues the pages for writing to the cache from the netfs's read-side routines and returns immediately.
fscache_write_op() then picks them up in the background and passes them over to the backend (eg. cachefiles_write_page()) which writes them out to the cache.
So I think it should be safe to call file_start/end_write() or whatever around the file->f_op->write() calls.
David
| |