lkml.org 
[lkml]   [2010]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] FS: btrfs, use helpers for rlimits
On 02/10/2010 09:01 PM, Chris Mason wrote:
> Thanks, I have this queued up for .34

Hi, this is still not merged. Was it lost?

> On Wed, Feb 10, 2010 at 09:00:09PM +0100, Jiri Slaby wrote:
>> Make sure compiler won't do weird things with limits. E.g. fetching
>> them twice may return 2 different values after writable limits are
>> implemented.
>>
>> I.e. either use rlimit helpers added in
>> 3e10e716abf3c71bdb5d86b8f507f9e72236c9cd
>> or ACCESS_ONCE if not applicable.
>>
>> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
>> Cc: Chris Mason <chris.mason@oracle.com>
>> Cc: linux-btrfs@vger.kernel.org
>> ---
>> fs/btrfs/inode.c | 3 +--
>> 1 files changed, 1 insertions(+), 2 deletions(-)
>>
>> diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
>> index c41db6d..5aa0cef 100644
>> --- a/fs/btrfs/inode.c
>> +++ b/fs/btrfs/inode.c
>> @@ -3256,8 +3256,7 @@ static int btrfs_setattr_size(struct inode *inode, struct iattr *attr)
>> return 0;
>>
>> if (attr->ia_size > inode->i_size) {
>> - unsigned long limit;
>> - limit = current->signal->rlim[RLIMIT_FSIZE].rlim_cur;
>> + unsigned long limit = rlimit(RLIMIT_FSIZE);
>> if (attr->ia_size > inode->i_sb->s_maxbytes)
>> return -EFBIG;
>> if (limit != RLIM_INFINITY && attr->ia_size > limit) {
>> --
>> 1.6.6.1
>>


--
js
suse labs


\
 
 \ /
  Last update: 2010-09-03 10:25    [W:0.061 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site