[PATCH 11/10] xfsprogs: remove unused delete_attr_ok

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



delete_attr_ok is never set to anything but 1;
remove it and all associated code.

Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---

diff --git a/repair/dinode.c b/repair/dinode.c
index 07bcf80..9af4f05 100644
--- a/repair/dinode.c
+++ b/repair/dinode.c
@@ -2093,14 +2093,9 @@ process_inode_attr_fork(
 		do_warn(_("bad attribute fork in inode %" PRIu64), lino);
 
 		if (!no_modify)  {
-			if (delete_attr_ok)  {
-				do_warn(_(", clearing attr fork\n"));
-				*dirty += clear_dinode_attr(mp, dino, lino);
-				dino->di_aformat = XFS_DINODE_FMT_LOCAL;
-			} else  {
-				do_warn("\n");
-				*dirty += clear_dinode(mp, dino, lino);
-			}
+			do_warn(_(", clearing attr fork\n"));
+			*dirty += clear_dinode_attr(mp, dino, lino);
+			dino->di_aformat = XFS_DINODE_FMT_LOCAL;
 			ASSERT(*dirty > 0);
 		} else  {
 			do_warn(_(", would clear attr fork\n"));
@@ -2111,7 +2106,7 @@ process_inode_attr_fork(
 		blkmap_free(ablkmap);
 		*retval = 1;
 
-		return delete_attr_ok ? 0 : 1;
+		return 0;
 	}
 
 	if (check_dups)  {
diff --git a/repair/globals.h b/repair/globals.h
index 5192542..e777ba2 100644
--- a/repair/globals.h
+++ b/repair/globals.h
@@ -94,7 +94,6 @@ EXTERN int	dangerously;		/* live dangerously ... fix ro mount */
 EXTERN int	isa_file;
 EXTERN int	zap_log;
 EXTERN int	dumpcore;		/* abort, not exit on fatal errs */
-EXTERN int	delete_attr_ok;		/* can clear attrs w/o clearing files */
 EXTERN int	force_geo;		/* can set geo on low confidence info */
 EXTERN int	assume_xfs;		/* assume we have an xfs fs */
 EXTERN char	*log_name;		/* Name of log device */
diff --git a/repair/xfs_repair.c b/repair/xfs_repair.c
index c2106e4..b2a2432 100644
--- a/repair/xfs_repair.c
+++ b/repair/xfs_repair.c
@@ -198,7 +198,6 @@ process_args(int argc, char **argv)
 	zap_log = 0;
 	dumpcore = 0;
 	full_ino_ex_data = 0;
-	delete_attr_ok = 1;
 	force_geo = 0;
 	assume_xfs = 0;
 	copied_sunit = 0;

--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux