mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-21 13:24:15 +08:00
quota: Remove superfluous inlines
Remove inlines of large functions to decrease code size (saved 1543 bytes). Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
parent
bf84c82d00
commit
7a2435d874
@ -243,7 +243,8 @@ static inline void remove_dquot_hash(struct dquot *dquot)
|
|||||||
hlist_del_init(&dquot->dq_hash);
|
hlist_del_init(&dquot->dq_hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct dquot *find_dquot(unsigned int hashent, struct super_block *sb, unsigned int id, int type)
|
static struct dquot *find_dquot(unsigned int hashent, struct super_block *sb,
|
||||||
|
unsigned int id, int type)
|
||||||
{
|
{
|
||||||
struct hlist_node *node;
|
struct hlist_node *node;
|
||||||
struct dquot *dquot;
|
struct dquot *dquot;
|
||||||
@ -935,7 +936,7 @@ void dquot_free_reserved_space(struct dquot *dquot, qsize_t number)
|
|||||||
dquot->dq_dqb.dqb_rsvspace -= number;
|
dquot->dq_dqb.dqb_rsvspace -= number;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void dquot_decr_inodes(struct dquot *dquot, qsize_t number)
|
static void dquot_decr_inodes(struct dquot *dquot, qsize_t number)
|
||||||
{
|
{
|
||||||
if (sb_dqopt(dquot->dq_sb)->flags & DQUOT_NEGATIVE_USAGE ||
|
if (sb_dqopt(dquot->dq_sb)->flags & DQUOT_NEGATIVE_USAGE ||
|
||||||
dquot->dq_dqb.dqb_curinodes >= number)
|
dquot->dq_dqb.dqb_curinodes >= number)
|
||||||
@ -947,7 +948,7 @@ static inline void dquot_decr_inodes(struct dquot *dquot, qsize_t number)
|
|||||||
clear_bit(DQ_INODES_B, &dquot->dq_flags);
|
clear_bit(DQ_INODES_B, &dquot->dq_flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void dquot_decr_space(struct dquot *dquot, qsize_t number)
|
static void dquot_decr_space(struct dquot *dquot, qsize_t number)
|
||||||
{
|
{
|
||||||
if (sb_dqopt(dquot->dq_sb)->flags & DQUOT_NEGATIVE_USAGE ||
|
if (sb_dqopt(dquot->dq_sb)->flags & DQUOT_NEGATIVE_USAGE ||
|
||||||
dquot->dq_dqb.dqb_curspace >= number)
|
dquot->dq_dqb.dqb_curspace >= number)
|
||||||
@ -974,7 +975,7 @@ static int warning_issued(struct dquot *dquot, const int warntype)
|
|||||||
#ifdef CONFIG_PRINT_QUOTA_WARNING
|
#ifdef CONFIG_PRINT_QUOTA_WARNING
|
||||||
static int flag_print_warnings = 1;
|
static int flag_print_warnings = 1;
|
||||||
|
|
||||||
static inline int need_print_warning(struct dquot *dquot)
|
static int need_print_warning(struct dquot *dquot)
|
||||||
{
|
{
|
||||||
if (!flag_print_warnings)
|
if (!flag_print_warnings)
|
||||||
return 0;
|
return 0;
|
||||||
@ -1109,7 +1110,7 @@ err_out:
|
|||||||
*
|
*
|
||||||
* Note that this function can sleep.
|
* Note that this function can sleep.
|
||||||
*/
|
*/
|
||||||
static inline void flush_warnings(struct dquot * const *dquots, char *warntype)
|
static void flush_warnings(struct dquot *const *dquots, char *warntype)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -1125,7 +1126,7 @@ static inline void flush_warnings(struct dquot * const *dquots, char *warntype)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline char ignore_hardlimit(struct dquot *dquot)
|
static int ignore_hardlimit(struct dquot *dquot)
|
||||||
{
|
{
|
||||||
struct mem_dqinfo *info = &sb_dqopt(dquot->dq_sb)->info[dquot->dq_type];
|
struct mem_dqinfo *info = &sb_dqopt(dquot->dq_sb)->info[dquot->dq_type];
|
||||||
|
|
||||||
|
@ -341,7 +341,7 @@ static int do_quotactl(struct super_block *sb, int type, int cmd, qid_t id, void
|
|||||||
* look up a superblock on which quota ops will be performed
|
* look up a superblock on which quota ops will be performed
|
||||||
* - use the name of a block device to find the superblock thereon
|
* - use the name of a block device to find the superblock thereon
|
||||||
*/
|
*/
|
||||||
static inline struct super_block *quotactl_block(const char __user *special)
|
static struct super_block *quotactl_block(const char __user *special)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_BLOCK
|
#ifdef CONFIG_BLOCK
|
||||||
struct block_device *bdev;
|
struct block_device *bdev;
|
||||||
|
@ -33,7 +33,7 @@ static int get_index(struct qtree_mem_dqinfo *info, qid_t id, int depth)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Number of entries in one blocks */
|
/* Number of entries in one blocks */
|
||||||
static inline int qtree_dqstr_in_blk(struct qtree_mem_dqinfo *info)
|
static int qtree_dqstr_in_blk(struct qtree_mem_dqinfo *info)
|
||||||
{
|
{
|
||||||
return (info->dqi_usable_bs - sizeof(struct qt_disk_dqdbheader))
|
return (info->dqi_usable_bs - sizeof(struct qt_disk_dqdbheader))
|
||||||
/ info->dqi_entry_size;
|
/ info->dqi_entry_size;
|
||||||
@ -47,7 +47,7 @@ static char *getdqbuf(size_t size)
|
|||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline ssize_t read_blk(struct qtree_mem_dqinfo *info, uint blk, char *buf)
|
static ssize_t read_blk(struct qtree_mem_dqinfo *info, uint blk, char *buf)
|
||||||
{
|
{
|
||||||
struct super_block *sb = info->dqi_sb;
|
struct super_block *sb = info->dqi_sb;
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ static inline ssize_t read_blk(struct qtree_mem_dqinfo *info, uint blk, char *bu
|
|||||||
info->dqi_usable_bs, blk << info->dqi_blocksize_bits);
|
info->dqi_usable_bs, blk << info->dqi_blocksize_bits);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline ssize_t write_blk(struct qtree_mem_dqinfo *info, uint blk, char *buf)
|
static ssize_t write_blk(struct qtree_mem_dqinfo *info, uint blk, char *buf)
|
||||||
{
|
{
|
||||||
struct super_block *sb = info->dqi_sb;
|
struct super_block *sb = info->dqi_sb;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user