From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [djwong-xfs:rmap-intent-cleanups 311/407] fs/xfs/xfs_imeta_utils.c:167 xfs_imeta_start_dir_update() warn: missing error code 'error'
Date: Wed, 23 Aug 2023 21:40:40 +0800 [thread overview]
Message-ID: <202308232139.Lh5BLLmW-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: "Darrick J. Wong" <darrick.wong@oracle.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git rmap-intent-cleanups
head: 55b33d3f7a00cf89ee5c47dba0a8c0ffe7f1f8bb
commit: ea9de6f697b65f02e13e509091b4f5191ebfa981 [311/407] xfs: read and write metadata inode directory
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: parisc-randconfig-r081-20230823 (https://download.01.org/0day-ci/archive/20230823/202308232139.Lh5BLLmW-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230823/202308232139.Lh5BLLmW-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202308232139.Lh5BLLmW-lkp@intel.com/
smatch warnings:
fs/xfs/xfs_imeta_utils.c:167 xfs_imeta_start_dir_update() warn: missing error code 'error'
vim +/error +167 fs/xfs/xfs_imeta_utils.c
94d1dbc5f4d8ff Darrick J. Wong 2023-03-06 131
94d1dbc5f4d8ff Darrick J. Wong 2023-03-06 132 /*
94d1dbc5f4d8ff Darrick J. Wong 2023-03-06 133 * Begin the process of linking a metadata file by allocating transactions
94d1dbc5f4d8ff Darrick J. Wong 2023-03-06 134 * and locking whatever resources we're going to need.
94d1dbc5f4d8ff Darrick J. Wong 2023-03-06 135 */
94d1dbc5f4d8ff Darrick J. Wong 2023-03-06 136 static inline int
94d1dbc5f4d8ff Darrick J. Wong 2023-03-06 137 xfs_imeta_start_dir_update(
94d1dbc5f4d8ff Darrick J. Wong 2023-03-06 138 struct xfs_mount *mp,
94d1dbc5f4d8ff Darrick J. Wong 2023-03-06 139 const struct xfs_imeta_path *path,
94d1dbc5f4d8ff Darrick J. Wong 2023-03-06 140 struct xfs_inode *ip,
94d1dbc5f4d8ff Darrick J. Wong 2023-03-06 141 struct xfs_trans_res *tr_resv,
94d1dbc5f4d8ff Darrick J. Wong 2023-03-06 142 unsigned int resblks,
94d1dbc5f4d8ff Darrick J. Wong 2023-03-06 143 struct xfs_imeta_update *upd)
94d1dbc5f4d8ff Darrick J. Wong 2023-03-06 144 {
94d1dbc5f4d8ff Darrick J. Wong 2023-03-06 145 int error;
94d1dbc5f4d8ff Darrick J. Wong 2023-03-06 146
94d1dbc5f4d8ff Darrick J. Wong 2023-03-06 147 error = xfs_imeta_init(mp, path, upd);
94d1dbc5f4d8ff Darrick J. Wong 2023-03-06 148 if (error)
94d1dbc5f4d8ff Darrick J. Wong 2023-03-06 149 return error;
94d1dbc5f4d8ff Darrick J. Wong 2023-03-06 150
94d1dbc5f4d8ff Darrick J. Wong 2023-03-06 151 upd->ip = ip;
94d1dbc5f4d8ff Darrick J. Wong 2023-03-06 152
ea9de6f697b65f Darrick J. Wong 2023-03-06 153 if (upd->dp) {
ea9de6f697b65f Darrick J. Wong 2023-03-06 154 int nospace_error = 0;
ea9de6f697b65f Darrick J. Wong 2023-03-06 155
ea9de6f697b65f Darrick J. Wong 2023-03-06 156 error = xfs_trans_alloc_dir(upd->dp, tr_resv, upd->ip,
ea9de6f697b65f Darrick J. Wong 2023-03-06 157 &resblks, &upd->tp, &nospace_error);
ea9de6f697b65f Darrick J. Wong 2023-03-06 158 if (error)
ea9de6f697b65f Darrick J. Wong 2023-03-06 159 goto out_teardown;
ea9de6f697b65f Darrick J. Wong 2023-03-06 160 if (!resblks) {
ea9de6f697b65f Darrick J. Wong 2023-03-06 161 /* We don't allow reservationless updates. */
ea9de6f697b65f Darrick J. Wong 2023-03-06 162 xfs_trans_cancel(upd->tp);
ea9de6f697b65f Darrick J. Wong 2023-03-06 163 upd->tp = NULL;
ea9de6f697b65f Darrick J. Wong 2023-03-06 164 xfs_iunlock(upd->dp, XFS_ILOCK_EXCL);
ea9de6f697b65f Darrick J. Wong 2023-03-06 165 xfs_iunlock(upd->ip, XFS_ILOCK_EXCL);
ea9de6f697b65f Darrick J. Wong 2023-03-06 166 error = nospace_error;
ea9de6f697b65f Darrick J. Wong 2023-03-06 @167 goto out_teardown;
ea9de6f697b65f Darrick J. Wong 2023-03-06 168 }
ea9de6f697b65f Darrick J. Wong 2023-03-06 169
ea9de6f697b65f Darrick J. Wong 2023-03-06 170 upd->dp_locked = true;
ea9de6f697b65f Darrick J. Wong 2023-03-06 171 } else {
ea9de6f697b65f Darrick J. Wong 2023-03-06 172 error = xfs_trans_alloc_inode(upd->ip, tr_resv, resblks, 0,
ea9de6f697b65f Darrick J. Wong 2023-03-06 173 false, &upd->tp);
94d1dbc5f4d8ff Darrick J. Wong 2023-03-06 174 if (error)
94d1dbc5f4d8ff Darrick J. Wong 2023-03-06 175 goto out_teardown;
ea9de6f697b65f Darrick J. Wong 2023-03-06 176 }
94d1dbc5f4d8ff Darrick J. Wong 2023-03-06 177
94d1dbc5f4d8ff Darrick J. Wong 2023-03-06 178 upd->ip_locked = true;
94d1dbc5f4d8ff Darrick J. Wong 2023-03-06 179 return 0;
94d1dbc5f4d8ff Darrick J. Wong 2023-03-06 180 out_teardown:
94d1dbc5f4d8ff Darrick J. Wong 2023-03-06 181 xfs_imeta_teardown(upd, error);
94d1dbc5f4d8ff Darrick J. Wong 2023-03-06 182 return error;
94d1dbc5f4d8ff Darrick J. Wong 2023-03-06 183 }
94d1dbc5f4d8ff Darrick J. Wong 2023-03-06 184
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-08-23 13:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202308232139.Lh5BLLmW-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.