HomeFreeBSD

Check for unlinked znodes after igrab()

Description

Check for unlinked znodes after igrab()

The changes in commit 41e1aa2a / PR #9583 introduced a regression on
tmpfile_001_pos: fsetxattr() on a O_TMPFILE file descriptor started
to fail with errno ENODATA:

    openat(AT_FDCWD, "/test", O_RDWR|O_TMPFILE, 0666) = 3
    <...>
    fsetxattr(3, "user.test", <...>, 64, 0) = -1 ENODATA

The originally proposed change on PR #9583 is not susceptible to it,
so just move the code/if-checks around back in that way, to fix it.

Reviewed-by: Pavel Snajdr <snajpa@snajpa.net>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Original-patch-by: Heitor Alves de Siqueira <halves@canonical.com>
Signed-off-by: Mauricio Faria de Oliveira <mfo@canonical.com>
Closes #9602

Details

Provenance
Mauricio Faria de Oliveira <mfo@canonical.com>Authored on Nov 21 2019, 8:24 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Nov 21 2019, 8:24 PM
Parents
rGda92d5cbb38c: Add zfs_file_* interface, remove vnodes
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG0c46813805f4: Check for unlinked znodes after igrab() (authored by Mauricio Faria de Oliveira <mfo@canonical.com>).Nov 21 2019, 8:24 PM