Messages in this thread | | | Date | Mon, 3 Mar 2014 14:20:33 -0800 | Subject | Re: Update of file offset on write() etc. is non-atomic with I/O | From | Linus Torvalds <> |
| |
On Mon, Mar 3, 2014 at 2:09 PM, Al Viro <viro@zeniv.linux.org.uk> wrote: > > Yes, but in that case fdget() has grabbed a reference to that sucker, > so the only way to end with refcount 1 is to have the damn thing gone > from descriptor table in between. And AFAICS in that case we are just > fine without f_pos_lock.
Ahh. Yes, you're right, just checking the file_count() is sufficient, because as you say, the threaded case will have incremented it for the case we care about./
Linus
| |