From: Andrew Morton <akpm@zip.com.au>
To: eddantes@wanadoo.fr
Cc: Gregoire Favre <greg@ulima.unil.ch>, linux-kernel@vger.kernel.org
Subject: Re: 2.4.7-ac8 compilation error
Date: Mon, 06 Aug 2001 16:14:11 -0700 [thread overview]
Message-ID: <3B6F24C3.BD3972B4@zip.com.au> (raw)
In-Reply-To: <20010806230743.A12850@ulima.unil.ch> <5.1.0.14.2.20010806231341.00aa7580@pop.wanadoo.fr>
--- linux-2.4.7-ac8/mm/shmem.c Mon Aug 6 12:05:28 2001
+++ ac/mm/shmem.c Mon Aug 6 16:02:39 2001
@@ -739,6 +739,30 @@ struct inode *shmem_get_inode(struct sup
return inode;
}
+static int shmem_set_size(struct shmem_sb_info *sbinfo,
+ unsigned long max_blocks, unsigned long max_inodes)
+{
+ int error;
+ unsigned long blocks, inodes;
+
+ spin_lock(&sbinfo->stat_lock);
+ blocks = sbinfo->max_blocks - sbinfo->free_blocks;
+ inodes = sbinfo->max_inodes - sbinfo->free_inodes;
+ error = -EINVAL;
+ if (max_blocks < blocks)
+ goto out;
+ if (max_inodes < inodes)
+ goto out;
+ error = 0;
+ sbinfo->max_blocks = max_blocks;
+ sbinfo->free_blocks = max_blocks - blocks;
+ sbinfo->max_inodes = max_inodes;
+ sbinfo->free_inodes = max_inodes - inodes;
+out:
+ spin_unlock(&sbinfo->stat_lock);
+ return error;
+}
+
#ifdef CONFIG_TMPFS
static struct inode_operations shmem_symlink_inode_operations;
@@ -1242,30 +1266,6 @@ static int shmem_parse_options(char *opt
return 1;
}
return 0;
-}
-
-static int shmem_set_size(struct shmem_sb_info *sbinfo,
- unsigned long max_blocks, unsigned long max_inodes)
-{
- int error;
- unsigned long blocks, inodes;
-
- spin_lock(&sbinfo->stat_lock);
- blocks = sbinfo->max_blocks - sbinfo->free_blocks;
- inodes = sbinfo->max_inodes - sbinfo->free_inodes;
- error = -EINVAL;
- if (max_blocks < blocks)
- goto out;
- if (max_inodes < inodes)
- goto out;
- error = 0;
- sbinfo->max_blocks = max_blocks;
- sbinfo->free_blocks = max_blocks - blocks;
- sbinfo->max_inodes = max_inodes;
- sbinfo->free_inodes = max_inodes - inodes;
-out:
- spin_unlock(&sbinfo->stat_lock);
- return error;
}
static int shmem_remount_fs (struct super_block *sb, int *flags, char *data)
prev parent reply other threads:[~2001-08-06 23:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-06 21:07 2.4.7-ac8 compilation error Gregoire Favre
2001-08-06 21:17 ` eddantes
2001-08-06 23:14 ` Andrew Morton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3B6F24C3.BD3972B4@zip.com.au \
--to=akpm@zip.com.au \
--cc=eddantes@wanadoo.fr \
--cc=greg@ulima.unil.ch \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.