+// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2000-2001,2005 Silicon Graphics, Inc.
* All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "libxfs.h"
update_inode_nlinks(
xfs_mount_t *mp,
xfs_ino_t ino,
- __uint32_t nlinks)
+ uint32_t nlinks)
{
xfs_trans_t *tp;
xfs_inode_t *ip;
error = -libxfs_trans_alloc(mp, &M_RES(mp)->tr_remove, nres, 0, 0, &tp);
ASSERT(error == 0);
- error = -libxfs_trans_iget(mp, tp, ino, 0, 0, &ip);
-
+ error = -libxfs_iget(mp, tp, ino, 0, &ip, &xfs_default_ifork_ops);
if (error) {
if (!no_modify)
do_error(
if (!dirty) {
libxfs_trans_cancel(tp);
} else {
+ libxfs_trans_ijoin(tp, ip, 0);
libxfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
/*
* no need to do a bmap finish since
ASSERT(error == 0);
}
- IRELE(ip);
+ libxfs_irele(ip);
}
/*
*/
static void
do_link_updates(
- struct work_queue *wq,
+ struct workqueue *wq,
xfs_agnumber_t agno,
void *arg)
{
+ struct xfs_mount *mp = wq->wq_ctx;
ino_tree_node_t *irec;
int j;
- __uint32_t nrefs;
+ uint32_t nrefs;
for (irec = findfirst_inode_rec(agno); irec;
irec = next_ino_rec(irec)) {
ASSERT(no_modify || nrefs > 0);
if (get_inode_disk_nlinks(irec, j) != nrefs)
- update_inode_nlinks(wq->mp,
- XFS_AGINO_TO_INO(wq->mp, agno,
+ update_inode_nlinks(wq->wq_ctx,
+ XFS_AGINO_TO_INO(mp, agno,
irec->ino_startnum + j),
nrefs);
}
struct xfs_mount *mp,
int scan_threads)
{
- struct work_queue wq;
+ struct workqueue wq;
int agno;
if (!no_modify)
else
do_log(_("Phase 7 - verify link counts...\n"));
- set_progress_msg(PROGRESS_FMT_CORR_LINK, (__uint64_t) glob_agcount);
+ set_progress_msg(PROGRESS_FMT_CORR_LINK, (uint64_t) glob_agcount);
create_work_queue(&wq, mp, scan_threads);