hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/fs/ntfs/namei.c
....@@ -1,23 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * namei.c - NTFS kernel directory inode operations. Part of the Linux-NTFS
34 * project.
45 *
56 * Copyright (c) 2001-2006 Anton Altaparmakov
6
- *
7
- * This program/include file is free software; you can redistribute it and/or
8
- * modify it under the terms of the GNU General Public License as published
9
- * by the Free Software Foundation; either version 2 of the License, or
10
- * (at your option) any later version.
11
- *
12
- * This program/include file is distributed in the hope that it will be
13
- * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
14
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- * GNU General Public License for more details.
16
- *
17
- * You should have received a copy of the GNU General Public License
18
- * along with this program (in the main directory of the Linux-NTFS
19
- * distribution in the file COPYING); if not, write to the Free Software
20
- * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
217 */
228
239 #include <linux/dcache.h>
....@@ -129,7 +115,7 @@
129115 dent_ino = MREF(mref);
130116 ntfs_debug("Found inode 0x%lx. Calling ntfs_iget.", dent_ino);
131117 dent_inode = ntfs_iget(vol->sb, dent_ino);
132
- if (likely(!IS_ERR(dent_inode))) {
118
+ if (!IS_ERR(dent_inode)) {
133119 /* Consistency check. */
134120 if (is_bad_inode(dent_inode) || MSEQNO(mref) ==
135121 NTFS_I(dent_inode)->seq_no ||
....@@ -312,7 +298,7 @@
312298 /* Get the mft record of the inode belonging to the child dentry. */
313299 mrec = map_mft_record(ni);
314300 if (IS_ERR(mrec))
315
- return (struct dentry *)mrec;
301
+ return ERR_CAST(mrec);
316302 /* Find the first file name attribute in the mft record. */
317303 ctx = ntfs_attr_get_search_ctx(ni, mrec);
318304 if (unlikely(!ctx)) {