]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
libxfs: remove unused libxfs_iget arg
authorEric Sandeen <sandeen@redhat.com>
Sun, 2 Oct 2016 23:36:40 +0000 (10:36 +1100)
committerDave Chinner <david@fromorbit.com>
Sun, 2 Oct 2016 23:36:40 +0000 (10:36 +1100)
libxfs_iget() is always called with bno == 0.  Which is probably a
good thing, because it then passes bno to xfs_iread as iget_flags!

So remove the libxfs_iget arg, and explicitly pass 0 to xfs_iread
for flags.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
db/attrset.c
include/xfs_inode.h
libxfs/rdwr.c
libxfs/trans.c
repair/phase6.c

index ec9da5a7baf7a7a1e45e9b3c8289bd11cc0cb9f0..ad3c8f371dc0886c707c88e43024e57a7ebb5925 100644 (file)
@@ -151,7 +151,7 @@ attr_set_f(
                value = NULL;
        }
 
-       if (libxfs_iget(mp, NULL, iocur_top->ino, 0, &ip, 0)) {
+       if (libxfs_iget(mp, NULL, iocur_top->ino, 0, &ip)) {
                dbprintf(_("failed to iget inode %llu\n"),
                        (unsigned long long)iocur_top->ino);
                goto out;
@@ -226,7 +226,7 @@ attr_remove_f(
 
        name = argv[optind];
 
-       if (libxfs_iget(mp, NULL, iocur_top->ino, 0, &ip, 0)) {
+       if (libxfs_iget(mp, NULL, iocur_top->ino, 0, &ip)) {
                dbprintf(_("failed to iget inode %llu\n"),
                        (unsigned long long)iocur_top->ino);
                goto out;
index 8141d972553ebdec8adc70c0b4ef79371e839fbc..0a8edeb4b8c548d1a92fbb533c03e063e12c5f3f 100644 (file)
@@ -139,7 +139,7 @@ extern int  libxfs_iflush_int (struct xfs_inode *, struct xfs_buf *);
 
 /* Inode Cache Interfaces */
 extern int     libxfs_iget(struct xfs_mount *, struct xfs_trans *, xfs_ino_t,
-                               uint, struct xfs_inode **, xfs_daddr_t);
+                               uint, struct xfs_inode **);
 extern void    libxfs_iput(struct xfs_inode *);
 
 #define IRELE(ip) libxfs_iput(ip)
index aa30522e9641a09d4c628a0c11e432b1b27c77a1..1103e2c1bf1bec9dfeb7fbcae0e249f218506fb7 100644 (file)
@@ -1330,7 +1330,7 @@ extern kmem_zone_t        *xfs_inode_zone;
 
 int
 libxfs_iget(xfs_mount_t *mp, xfs_trans_t *tp, xfs_ino_t ino, uint lock_flags,
-               xfs_inode_t **ipp, xfs_daddr_t bno)
+               xfs_inode_t **ipp)
 {
        xfs_inode_t     *ip;
        int             error = 0;
@@ -1341,7 +1341,7 @@ libxfs_iget(xfs_mount_t *mp, xfs_trans_t *tp, xfs_ino_t ino, uint lock_flags,
 
        ip->i_ino = ino;
        ip->i_mount = mp;
-       error = xfs_iread(mp, tp, ip, bno);
+       error = xfs_iread(mp, tp, ip, 0);
        if (error) {
                kmem_zone_free(xfs_inode_zone, ip);
                *ipp = NULL;
index a4d97829ebb0355222b8f1678189aee97609ba84..ea60d032a8e3d6d932bb9e78f53729de676f1cc2 100644 (file)
@@ -224,9 +224,9 @@ libxfs_trans_iget(
        xfs_inode_log_item_t    *iip;
 
        if (tp == NULL)
-               return libxfs_iget(mp, tp, ino, lock_flags, ipp, 0);
+               return libxfs_iget(mp, tp, ino, lock_flags, ipp);
 
-       error = libxfs_iget(mp, tp, ino, lock_flags, &ip, 0);
+       error = libxfs_iget(mp, tp, ino, lock_flags, &ip);
        if (error)
                return error;
        ASSERT(ip != NULL);
index 5507af4ef5239b3770d21913855c049193fd4c3c..06eed16c28fa9252e6e8e6c35f8498d41ad0bedc 100644 (file)
@@ -929,7 +929,7 @@ mk_orphanage(xfs_mount_t *mp)
         * would have been cleared in phase3 and phase4.
         */
 
-       if ((i = -libxfs_iget(mp, NULL, mp->m_sb.sb_rootino, 0, &pip, 0)))
+       if ((i = -libxfs_iget(mp, NULL, mp->m_sb.sb_rootino, 0, &pip)))
                do_error(_("%d - couldn't iget root inode to obtain %s\n"),
                        i, ORPHANAGE);
 
@@ -953,7 +953,7 @@ mk_orphanage(xfs_mount_t *mp)
         * use iget/ijoin instead of trans_iget because the ialloc
         * wrapper can commit the transaction and start a new one
         */
-/*     if ((i = -libxfs_iget(mp, NULL, mp->m_sb.sb_rootino, 0, &pip, 0)))
+/*     if ((i = -libxfs_iget(mp, NULL, mp->m_sb.sb_rootino, 0, &pip)))
                do_error(_("%d - couldn't iget root inode to make %s\n"),
                        i, ORPHANAGE);*/
 
@@ -1067,7 +1067,7 @@ mv_orphanage(
        xname.len = snprintf((char *)fname, sizeof(fname), "%llu",
                                (unsigned long long)ino);
 
-       err = -libxfs_iget(mp, NULL, orphanage_ino, 0, &orphanage_ip, 0);
+       err = -libxfs_iget(mp, NULL, orphanage_ino, 0, &orphanage_ip);
        if (err)
                do_error(_("%d - couldn't iget orphanage inode\n"), err);
        /*
@@ -1079,7 +1079,7 @@ mv_orphanage(
                xname.len = snprintf((char *)fname, sizeof(fname), "%llu.%d",
                                        (unsigned long long)ino, ++incr);
 
-       if ((err = -libxfs_iget(mp, NULL, ino, 0, &ino_p, 0)))
+       if ((err = -libxfs_iget(mp, NULL, ino, 0, &ino_p)))
                do_error(_("%d - couldn't iget disconnected inode\n"), err);
 
        xname.type = xfs_mode_to_ftype[(VFS_I(ino_p)->i_mode & S_IFMT)>>S_SHIFT];
@@ -2820,7 +2820,7 @@ process_dir_inode(
 
        ASSERT(!is_inode_refchecked(irec, ino_offset) || dotdot_update);
 
-       error = -libxfs_iget(mp, NULL, ino, 0, &ip, 0);
+       error = -libxfs_iget(mp, NULL, ino, 0, &ip);
        if (error) {
                if (!no_modify)
                        do_error(