lkml.org 
[lkml]   [2014]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: Update of file offset on write() etc. is non-atomic with I/O
From
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


\
 
 \ /
  Last update: 2014-03-04 00:01    [W:0.074 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site