mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 22:51:37 +00:00
kernfs: introduce kernfs_node_id
inode number and generation can identify a kernfs node. We are going to export the identification by exportfs operations, so put ino and generation into a separate structure. It's convenient when later patches use the identification. Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Shaohua Li <shli@fb.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
319ba91d35
commit
c53cd490b1
6 changed files with 21 additions and 13 deletions
|
@ -95,6 +95,15 @@ struct kernfs_elem_attr {
|
|||
struct kernfs_node *notify_next; /* for kernfs_notify() */
|
||||
};
|
||||
|
||||
/* represent a kernfs node */
|
||||
union kernfs_node_id {
|
||||
struct {
|
||||
u32 ino;
|
||||
u32 generation;
|
||||
};
|
||||
u64 id;
|
||||
};
|
||||
|
||||
/*
|
||||
* kernfs_node - the building block of kernfs hierarchy. Each and every
|
||||
* kernfs node is represented by single kernfs_node. Most fields are
|
||||
|
@ -131,11 +140,10 @@ struct kernfs_node {
|
|||
|
||||
void *priv;
|
||||
|
||||
union kernfs_node_id id;
|
||||
unsigned short flags;
|
||||
umode_t mode;
|
||||
unsigned int ino;
|
||||
struct kernfs_iattrs *iattr;
|
||||
u32 generation;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue