diff options
author | Andrew Price <anprice@redhat.com> | 2023-03-14 16:18:27 +0300 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2023-03-27 15:39:47 +0300 |
commit | 8dc14966ca3eb5bf4e200c50cc73199ee6de2bd7 (patch) | |
tree | b6375834dd96b339a0f8c02bef445a897396fb90 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 1e760fa3596e8c7f08412712c168288b79670d78 (diff) | |
download | linux-8dc14966ca3eb5bf4e200c50cc73199ee6de2bd7.tar.xz |
gfs2: Remove duplicate i_nlink check from gfs2_link()
The duplication is:
struct gfs2_inode *ip = GFS2_I(inode);
[...]
error = -ENOENT;
if (inode->i_nlink == 0)
goto out_gunlock;
[...]
error = -EINVAL;
if (!ip->i_inode.i_nlink)
goto out_gunlock;
The second check is removed. ENOENT is the correct error code for
attempts to link a deleted inode (ref: link(2)).
If we support O_TMPFILE in future the check will need to be updated with
an exception for inodes flagged I_LINKABLE so sorting out this
duplication now will make it a slightly cleaner change.
Signed-off-by: Andrew Price <anprice@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions