xfs: inode unlinked list needs to recalculate the inode CRC
authorDave Chinner <dchinner@redhat.com>
Wed, 5 Jun 2013 02:09:08 +0000 (12:09 +1000)
committerBen Myers <bpm@sgi.com>
Wed, 5 Jun 2013 16:19:10 +0000 (11:19 -0500)
The inode unlinked list manipulations operate directly on the inode
buffer, and so bypass the inode CRC calculation mechanisms. Hence an
inode on the unlinked list has an invalid CRC. Fix this by
recalculating the CRC whenever we modify an unlinked list pointer in
an inode, ncluding during log recovery. This is trivial to do and
results in  unlinked list operations always leaving a consistent
inode in the buffer.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
fs/xfs/xfs_inode.c
fs/xfs/xfs_log_recover.c

Simple merge
Simple merge