On Mon, Apr 30, 2012 at 6:53 PM, Dave Airlie <airlied at gmail.com> wrote: >> >> Do you have pointers to that discussion (assuming it was on sime mailing >> list)? The least I can do, while I am at it, is try to understand it and >> see if I can incorporate some ideas from there in the rework of the patch. > > Nope it was an offhand discussion on irc while we were talking about > some other ugly code.
Okay I think it was the code in coda, if (coda_inode->i_mapping == &coda_inode->i_data) coda_inode->i_mapping = host_inode->i_mapping; /* only allow additional mmaps as long as userspace isn't changing * the container file on us! */ else if (coda_inode->i_mapping != host_inode->i_mapping) { spin_unlock(&cii->c_lock); return -EBUSY; } We could use code like that to change the i_mapping, instead of failing. Dave.