GFS2: Use gfs2_dinode_out() in the inode create path
authorSteven Whitehouse <swhiteho@redhat.com>
Fri, 1 Mar 2013 09:29:12 +0000 (09:29 +0000)
committerSteven Whitehouse <swhiteho@redhat.com>
Mon, 8 Apr 2013 07:40:37 +0000 (08:40 +0100)
commit79ba74808df1132d9ddbf4e87304a4050e667e3e
tree0e5ddd568f03e4c9248321b9988d4a9e37c74400
parent28fb30275570e9397e551d6f8e3bfd78862ea79e
GFS2: Use gfs2_dinode_out() in the inode create path

Over the previous two patches relating to inode creation, the
content of init_dinode() has been looking more and more like
gfs2_dinode_out(). This is not an accident! This patch replaces
the parts of init_dinode() which are duplicated in gfs2_dinode_out()
with a call to that function.

Mostly that is straightforward, but there is one issue which needed
to be resolved relating to the link count. The link count has to be
set to zero in a certain error handling code path, which lands up
calling iput(). This is now done specifically in that code path
allowing the link count to be set earlier and written into the
on disk inode by gfs2_dinode_put() in the normal way.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/inode.c