]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: correctly fix the parent inode number during fsync()
authorEric Biggers <ebiggers@google.com>
Tue, 5 May 2020 18:41:11 +0000 (11:41 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 12 May 2020 03:36:46 +0000 (20:36 -0700)
commitc5db15f7cce0826d455ee88320a28971c7c0f08a
tree27e4f37bc61b46f10ceb404683814307025364f4
parent7b82531929264895b252cf0ee7dad64e0ac9fa1b
f2fs: correctly fix the parent inode number during fsync()

fsync() may be called on a deleted file that's still open.  So when
fsync() tries to set the parent inode number when the inode has
LOST_PINO and i_nlink == 1 (to avoid later checkpoints), it needs to
make sure to get the parent directory via a non-deleted alias.

Also remove the unnecessary igrab() and iput(), as the caller already
holds a reference to the inode.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/file.c