| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * namei.c - NTFS kernel directory inode operations. Part of the Linux-NTFS |
|---|
| 3 | 4 | * project. |
|---|
| 4 | 5 | * |
|---|
| 5 | 6 | * 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 |
|---|
| 21 | 7 | */ |
|---|
| 22 | 8 | |
|---|
| 23 | 9 | #include <linux/dcache.h> |
|---|
| .. | .. |
|---|
| 129 | 115 | dent_ino = MREF(mref); |
|---|
| 130 | 116 | ntfs_debug("Found inode 0x%lx. Calling ntfs_iget.", dent_ino); |
|---|
| 131 | 117 | dent_inode = ntfs_iget(vol->sb, dent_ino); |
|---|
| 132 | | - if (likely(!IS_ERR(dent_inode))) { |
|---|
| 118 | + if (!IS_ERR(dent_inode)) { |
|---|
| 133 | 119 | /* Consistency check. */ |
|---|
| 134 | 120 | if (is_bad_inode(dent_inode) || MSEQNO(mref) == |
|---|
| 135 | 121 | NTFS_I(dent_inode)->seq_no || |
|---|
| .. | .. |
|---|
| 312 | 298 | /* Get the mft record of the inode belonging to the child dentry. */ |
|---|
| 313 | 299 | mrec = map_mft_record(ni); |
|---|
| 314 | 300 | if (IS_ERR(mrec)) |
|---|
| 315 | | - return (struct dentry *)mrec; |
|---|
| 301 | + return ERR_CAST(mrec); |
|---|
| 316 | 302 | /* Find the first file name attribute in the mft record. */ |
|---|
| 317 | 303 | ctx = ntfs_attr_get_search_ctx(ni, mrec); |
|---|
| 318 | 304 | if (unlikely(!ctx)) { |
|---|