diff options
author | Shaohua Li <shli@fb.com> | 2017-07-12 20:49:50 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-07-29 17:00:03 +0200 |
commit | c53cd490b1a491ebf1d8e30da97e7231459a4208 (patch) | |
tree | 09edea3836ea440490dcc2993c802b65b93c1e6b /fs/kernfs/inode.c | |
parent | kernfs: don't set dentry->d_fsdata (diff) | |
download | linux-c53cd490b1a491ebf1d8e30da97e7231459a4208.tar.xz linux-c53cd490b1a491ebf1d8e30da97e7231459a4208.zip |
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>
Diffstat (limited to 'fs/kernfs/inode.c')
-rw-r--r-- | fs/kernfs/inode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/kernfs/inode.c b/fs/kernfs/inode.c index 4c8b51085a86..a34303981deb 100644 --- a/fs/kernfs/inode.c +++ b/fs/kernfs/inode.c @@ -220,7 +220,7 @@ static void kernfs_init_inode(struct kernfs_node *kn, struct inode *inode) inode->i_private = kn; inode->i_mapping->a_ops = &kernfs_aops; inode->i_op = &kernfs_iops; - inode->i_generation = kn->generation; + inode->i_generation = kn->id.generation; set_default_inode_attr(inode, kn->mode); kernfs_refresh_inode(kn, inode); @@ -266,7 +266,7 @@ struct inode *kernfs_get_inode(struct super_block *sb, struct kernfs_node *kn) { struct inode *inode; - inode = iget_locked(sb, kn->ino); + inode = iget_locked(sb, kn->id.ino); if (inode && (inode->i_state & I_NEW)) kernfs_init_inode(kn, inode); |