From: Eric Sandeen <sandeen@sandeen.net>
To: linux-xfs@vger.kernel.org
Subject: [PATCH 11/10] xfsprogs: remove unused delete_attr_ok
Date: Thu, 29 Mar 2018 10:43:02 -0500 [thread overview]
Message-ID: <9521811b-dc58-d756-e525-8ca428f1b806@sandeen.net> (raw)
In-Reply-To: <1522337662-26260-1-git-send-email-sandeen@sandeen.net>
delete_attr_ok is never set to anything but 1;
remove it and all associated code.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
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;
next prev parent reply other threads:[~2018-03-29 15:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-29 15:34 [PATCH 0/10] xfsprogs: remove old cruft Eric Sandeen
2018-03-29 15:34 ` [PATCH 01/10] xfs_repair: remove unused fs_attributes_allowed Eric Sandeen
2018-03-29 15:34 ` [PATCH 02/10] xfs_repair: remove unused fs_attributes2_allowed Eric Sandeen
2018-03-29 15:34 ` [PATCH 03/10] xfs_repair: remove unused fs_has_extflgbit_allowed Eric Sandeen
2018-03-29 15:34 ` [PATCH 04/10] xfs_repair: remove unused fs_aligned_inodes_allowed Eric Sandeen
2018-03-29 15:34 ` [PATCH 05/10] xfs_repair: remove unused fs_sb_feature_bits_allowed Eric Sandeen
2018-03-29 15:34 ` [PATCH 06/10] xfs_repair: remove unused fs_has_extflgbit_allowed Eric Sandeen
2018-03-29 15:34 ` [PATCH 07/10] xfs_repair: remove unused fs_shared_allowed variable Eric Sandeen
2018-03-29 15:34 ` [PATCH 08/10] xfs_repair: remove pre_65_beta option Eric Sandeen
2018-03-29 15:34 ` [PATCH 09/10] xfs_repair: test XFS_SB_VERSION_SHAREDBIT only once Eric Sandeen
2018-03-29 15:34 ` [PATCH 10/10] libxfs: warn about deprecation of irix, freebsd, darwin Eric Sandeen
2018-03-29 15:40 ` [PATCH 0/10] xfsprogs: remove old cruft Darrick J. Wong
2018-03-29 15:43 ` Eric Sandeen [this message]
2018-03-29 15:53 ` [PATCH 11/10] xfsprogs: remove unused delete_attr_ok Darrick J. Wong
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=9521811b-dc58-d756-e525-8ca428f1b806@sandeen.net \
--to=sandeen@sandeen.net \
--cc=linux-xfs@vger.kernel.org \
/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.