lkml.org 
[lkml]   [2008]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: fs_stack/eCryptfs: remove 3rd arg of copy_attr_all, add locking to copy_inode_size
On Thu, Apr 03, 2008 at 08:26:54PM +0100, Hugh Dickins wrote:
> On Thu, 3 Apr 2008, Erez Zadok wrote:
> > In message <20080403182001.GB30189@josefsipek.net>, "Josef 'Jeff' Sipek" writes:
> > > I think you need to check CONFIG_PREEMPT as well.
> >
> > I'm not sure if it's needed in case of CONFIG_PREEMPT. Anyone? The code
> > for i_size_write (below), and the comment at the top of the function,
> > suggest that the spinlock is needed only to prevent the lots seqcount.
>
> Correct.

True...

> > BTW, some time ago I reviewed all callers of i_size_write. I did so again
> > just now, and the results were the same:
> >
> > - a LOT of callers of i_size_write don't take any lock
>
> They mostly know that i_mutex is already held (as i_size_write comment
> mentions); but I believe that's up to the individual filesystem.

Is this function (fsstack_copy_inode_size) used only in unlocked paths? If
there's little chance that it'll ever need to be used in locked paths, then
sure, why not have the lock right in the function.

Josef 'Jeff' Sipek.

--
My public GPG key can be found at
http://www.josefsipek.net/gpg/public-0xC7958FFE.txt


\
 
 \ /
  Last update: 2008-04-03 21:35    [W:0.035 / U:1.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site