From: Nick Piggin Subject: Re: [PATCH] VFS: make file->f_pos access atomic on 32bit arch Date: Tue, 16 Sep 2008 22:54:21 +1000 Message-ID: <200809162254.21514.nickpiggin@yahoo.com.au> References: <58603.86657.qm@web26202.mail.ukl.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: Hisashi Hifumi , akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: Michael Trimarchi Return-path: In-Reply-To: <58603.86657.qm@web26202.mail.ukl.yahoo.com> Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Tuesday 16 September 2008 21:11, Michael Trimarchi wrote: > Hi, > > > + if (offset != file_pos_read(file)) > > + file_pos_write(file, offset); > > retval = offset; > > } > > Is not more efficient here a compare xchg operation? The compiler should do it if it was.