.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. |
---|
3 | 4 | * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. |
---|
4 | | - * |
---|
5 | | - * This copyrighted material is made available to anyone wishing to use, |
---|
6 | | - * modify, copy, or redistribute it subject to the terms and conditions |
---|
7 | | - * of the GNU General Public License version 2. |
---|
8 | 5 | */ |
---|
9 | 6 | |
---|
10 | 7 | #include <linux/spinlock.h> |
---|
.. | .. |
---|
137 | 134 | struct gfs2_sbd *sdp = sb->s_fs_info; |
---|
138 | 135 | struct inode *inode; |
---|
139 | 136 | |
---|
140 | | - inode = gfs2_lookup_by_inum(sdp, inum->no_addr, &inum->no_formal_ino, |
---|
| 137 | + if (!inum->no_formal_ino) |
---|
| 138 | + return ERR_PTR(-ESTALE); |
---|
| 139 | + inode = gfs2_lookup_by_inum(sdp, inum->no_addr, inum->no_formal_ino, |
---|
141 | 140 | GFS2_BLKST_DINODE); |
---|
142 | 141 | if (IS_ERR(inode)) |
---|
143 | 142 | return ERR_CAST(inode); |
---|