Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1647744
| From | Christoph Hellwig <hch@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/5] kernfs: implement i_generation |
| Date | 2017-05-23 09:50 +0200 |
| Message-ID | <tKcJQ-65-17@gated-at.bofh.it> (permalink) |
| References | <tK4sV-3eD-3@gated-at.bofh.it> <tK4sW-3eD-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, May 22, 2017 at 03:53:05PM -0700, Shaohua Li wrote: > Set i_generation for kernfs inod. This is required to implement exportfs > operations. > > Signed-off-by: Shaohua Li <shli@fb.com> > --- > fs/kernfs/dir.c | 2 ++ > fs/kernfs/inode.c | 1 + > include/linux/kernfs.h | 2 ++ > 3 files changed, 5 insertions(+) > > diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c > index db5900aaa..09d093e 100644 > --- a/fs/kernfs/dir.c > +++ b/fs/kernfs/dir.c > @@ -634,6 +634,7 @@ static struct kernfs_node *__kernfs_new_node(struct kernfs_root *root, > if (ret < 0) > goto err_out2; > kn->ino = ret; > + kn->generation = atomic_inc_return(&root->next_generation); i_generation is only supposed to be valid on a per-inode basis, so this global counter seems really odd.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/5] kernfs: implement i_generation Shaohua Li <shli@fb.com> - 2017-05-23 01:00 +0200
Re: [PATCH 1/5] kernfs: implement i_generation Christoph Hellwig <hch@infradead.org> - 2017-05-23 09:50 +0200
Re: [PATCH 1/5] kernfs: implement i_generation Tejun Heo <tj@kernel.org> - 2017-05-23 21:30 +0200
Re: [PATCH 1/5] kernfs: implement i_generation Christoph Hellwig <hch@infradead.org> - 2017-05-24 19:50 +0200
csiph-web