diff options
author | Chris Mason <chris.mason@oracle.com> | 2009-03-24 15:24:13 +0100 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2009-03-24 21:14:51 +0100 |
commit | a74ac3220774d33db967088906dc3351829e2d3a (patch) | |
tree | 292fe0b88a5917d3b282b6a1cdfca170f9405132 /fs/btrfs/inode.c | |
parent | Btrfs: limit balancing work while flushing delayed refs (diff) | |
download | linux-a74ac3220774d33db967088906dc3351829e2d3a.tar.xz linux-a74ac3220774d33db967088906dc3351829e2d3a.zip |
Btrfs: Make sure i_nlink doesn't hit zero too soon during log replay
During log replay, inodes are copied from the log to the main filesystem
btrees. Sometimes they have a zero link count in the log but they actually
gain links during the replay or have some in the main btree.
This patch updates the link count to be at least one after copying the
inode out of the log. This makes sure the inode is deleted during an
iput while the rest of the replay code is still working on it.
The log replay has fixup code to make sure that link counts are correct
at the end of the replay, so we could use any non-zero number here and
it would work fine.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/inode.c')
0 files changed, 0 insertions, 0 deletions