Re: fs_stack/eCryptfs: remove 3rd arg of copy_attr_all, add locking to copy_inode_size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>, "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
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux