hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/fs/gfs2/export.c
....@@ -1,10 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
34 * 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.
85 */
96
107 #include <linux/spinlock.h>
....@@ -137,7 +134,9 @@
137134 struct gfs2_sbd *sdp = sb->s_fs_info;
138135 struct inode *inode;
139136
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,
141140 GFS2_BLKST_DINODE);
142141 if (IS_ERR(inode))
143142 return ERR_CAST(inode);