]> git.baikalelectronics.ru Git - kernel.git/commit
ocfs2: Set i_nlink properly during reflink.
authorTao Ma <tao.ma@oracle.com>
Fri, 18 Dec 2009 02:24:55 +0000 (10:24 +0800)
committerJoel Becker <joel.becker@oracle.com>
Fri, 18 Dec 2009 21:32:28 +0000 (13:32 -0800)
commit57705f245ae25ab5738d2e81100e1e8f44665fe1
tree88e014a00955835988b7bc39a388846ebb0a778a
parent5321154d6acb7d22beb02c1d3d74d3d8465b2470
ocfs2: Set i_nlink properly during reflink.

We create a file in orphan dir for reflink so that if there
is any error, we don't create any wrong dentry in the dir.
But actually the file in orphan dir should be i_nlink = 0
so that it can be replayed and freed successfully.

This patch first set i_nlink to 0 when creating the file in
orphan dir and then set it to 1(reflink now only works for
regular file) when we move it to the dest dir.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
fs/ocfs2/namei.c