[-repost#3,1/1] FS: btrfs, use helpers for rlimits
diff mbox

Message ID 1287586804-17498-1-git-send-email-jslaby@suse.cz
State Not Applicable, archived
Headers show

Commit Message

Jiri Slaby Oct. 20, 2010, 3 p.m. UTC
None

Patch
diff mbox

diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index a21625d..323c6ca 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -3564,8 +3564,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) {