mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-04 02:16:45 +07:00
nilfs2: remove individual gfp constants for each metadata file
This gets rid of NILFS_CPFILE_GFP, NILFS_SUFILE_GFP, NILFS_DAT_GFP, and NILFS_IFILE_GFP. All of these constants refer to NILFS_MDT_GFP, and can be removed. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
This commit is contained in:
parent
3218929dbd
commit
7a102b0923
@ -27,8 +27,6 @@
|
|||||||
#include <linux/buffer_head.h>
|
#include <linux/buffer_head.h>
|
||||||
#include <linux/nilfs2_fs.h>
|
#include <linux/nilfs2_fs.h>
|
||||||
|
|
||||||
#define NILFS_CPFILE_GFP NILFS_MDT_GFP
|
|
||||||
|
|
||||||
|
|
||||||
int nilfs_cpfile_get_checkpoint(struct inode *, __u64, int,
|
int nilfs_cpfile_get_checkpoint(struct inode *, __u64, int,
|
||||||
struct nilfs_checkpoint **,
|
struct nilfs_checkpoint **,
|
||||||
|
@ -27,7 +27,6 @@
|
|||||||
#include <linux/buffer_head.h>
|
#include <linux/buffer_head.h>
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
|
||||||
#define NILFS_DAT_GFP NILFS_MDT_GFP
|
|
||||||
|
|
||||||
struct nilfs_palloc_req;
|
struct nilfs_palloc_req;
|
||||||
|
|
||||||
|
@ -31,7 +31,6 @@
|
|||||||
#include "mdt.h"
|
#include "mdt.h"
|
||||||
#include "alloc.h"
|
#include "alloc.h"
|
||||||
|
|
||||||
#define NILFS_IFILE_GFP NILFS_MDT_GFP
|
|
||||||
|
|
||||||
static inline struct nilfs_inode *
|
static inline struct nilfs_inode *
|
||||||
nilfs_ifile_map_inode(struct inode *ifile, ino_t ino, struct buffer_head *ibh)
|
nilfs_ifile_map_inode(struct inode *ifile, ino_t ino, struct buffer_head *ibh)
|
||||||
|
@ -513,9 +513,10 @@ nilfs_mdt_new_common(struct the_nilfs *nilfs, struct super_block *sb,
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct inode *nilfs_mdt_new(struct the_nilfs *nilfs, struct super_block *sb,
|
struct inode *nilfs_mdt_new(struct the_nilfs *nilfs, struct super_block *sb,
|
||||||
ino_t ino, gfp_t gfp_mask)
|
ino_t ino)
|
||||||
{
|
{
|
||||||
struct inode *inode = nilfs_mdt_new_common(nilfs, sb, ino, gfp_mask);
|
struct inode *inode = nilfs_mdt_new_common(nilfs, sb, ino,
|
||||||
|
NILFS_MDT_GFP);
|
||||||
|
|
||||||
if (!inode)
|
if (!inode)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -74,8 +74,7 @@ int nilfs_mdt_forget_block(struct inode *, unsigned long);
|
|||||||
int nilfs_mdt_mark_block_dirty(struct inode *, unsigned long);
|
int nilfs_mdt_mark_block_dirty(struct inode *, unsigned long);
|
||||||
int nilfs_mdt_fetch_dirty(struct inode *);
|
int nilfs_mdt_fetch_dirty(struct inode *);
|
||||||
|
|
||||||
struct inode *nilfs_mdt_new(struct the_nilfs *, struct super_block *, ino_t,
|
struct inode *nilfs_mdt_new(struct the_nilfs *, struct super_block *, ino_t);
|
||||||
gfp_t);
|
|
||||||
struct inode *nilfs_mdt_new_common(struct the_nilfs *, struct super_block *,
|
struct inode *nilfs_mdt_new_common(struct the_nilfs *, struct super_block *,
|
||||||
ino_t, gfp_t);
|
ino_t, gfp_t);
|
||||||
void nilfs_mdt_destroy(struct inode *);
|
void nilfs_mdt_destroy(struct inode *);
|
||||||
|
@ -28,7 +28,6 @@
|
|||||||
#include <linux/nilfs2_fs.h>
|
#include <linux/nilfs2_fs.h>
|
||||||
#include "mdt.h"
|
#include "mdt.h"
|
||||||
|
|
||||||
#define NILFS_SUFILE_GFP NILFS_MDT_GFP
|
|
||||||
|
|
||||||
static inline unsigned long nilfs_sufile_get_nsegments(struct inode *sufile)
|
static inline unsigned long nilfs_sufile_get_nsegments(struct inode *sufile)
|
||||||
{
|
{
|
||||||
|
@ -363,8 +363,7 @@ int nilfs_attach_checkpoint(struct nilfs_sb_info *sbi, __u64 cno)
|
|||||||
list_add(&sbi->s_list, &nilfs->ns_supers);
|
list_add(&sbi->s_list, &nilfs->ns_supers);
|
||||||
up_write(&nilfs->ns_super_sem);
|
up_write(&nilfs->ns_super_sem);
|
||||||
|
|
||||||
sbi->s_ifile = nilfs_mdt_new(
|
sbi->s_ifile = nilfs_mdt_new(nilfs, sbi->s_super, NILFS_IFILE_INO);
|
||||||
nilfs, sbi->s_super, NILFS_IFILE_INO, NILFS_IFILE_GFP);
|
|
||||||
if (!sbi->s_ifile)
|
if (!sbi->s_ifile)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
@ -187,23 +187,19 @@ static int nilfs_load_super_root(struct the_nilfs *nilfs,
|
|||||||
inode_size = nilfs->ns_inode_size;
|
inode_size = nilfs->ns_inode_size;
|
||||||
|
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
nilfs->ns_dat = nilfs_mdt_new(
|
nilfs->ns_dat = nilfs_mdt_new(nilfs, NULL, NILFS_DAT_INO);
|
||||||
nilfs, NULL, NILFS_DAT_INO, NILFS_DAT_GFP);
|
|
||||||
if (unlikely(!nilfs->ns_dat))
|
if (unlikely(!nilfs->ns_dat))
|
||||||
goto failed;
|
goto failed;
|
||||||
|
|
||||||
nilfs->ns_gc_dat = nilfs_mdt_new(
|
nilfs->ns_gc_dat = nilfs_mdt_new(nilfs, NULL, NILFS_DAT_INO);
|
||||||
nilfs, NULL, NILFS_DAT_INO, NILFS_DAT_GFP);
|
|
||||||
if (unlikely(!nilfs->ns_gc_dat))
|
if (unlikely(!nilfs->ns_gc_dat))
|
||||||
goto failed_dat;
|
goto failed_dat;
|
||||||
|
|
||||||
nilfs->ns_cpfile = nilfs_mdt_new(
|
nilfs->ns_cpfile = nilfs_mdt_new(nilfs, NULL, NILFS_CPFILE_INO);
|
||||||
nilfs, NULL, NILFS_CPFILE_INO, NILFS_CPFILE_GFP);
|
|
||||||
if (unlikely(!nilfs->ns_cpfile))
|
if (unlikely(!nilfs->ns_cpfile))
|
||||||
goto failed_gc_dat;
|
goto failed_gc_dat;
|
||||||
|
|
||||||
nilfs->ns_sufile = nilfs_mdt_new(
|
nilfs->ns_sufile = nilfs_mdt_new(nilfs, NULL, NILFS_SUFILE_INO);
|
||||||
nilfs, NULL, NILFS_SUFILE_INO, NILFS_SUFILE_GFP);
|
|
||||||
if (unlikely(!nilfs->ns_sufile))
|
if (unlikely(!nilfs->ns_sufile))
|
||||||
goto failed_cpfile;
|
goto failed_cpfile;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user