From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: darrick.wong@oracle.com, guaneryu@gmail.com
Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org
Subject: [PATCH 3/4] fsstress: remove attr_remove
Date: Tue, 10 Nov 2020 16:44:56 -0800 [thread overview]
Message-ID: <160505549612.1389938.4557085048629140407.stgit@magnolia> (raw)
In-Reply-To: <160505547722.1389938.14377167906399924976.stgit@magnolia>
From: Darrick J. Wong <darrick.wong@oracle.com>
attr_remove is deprecated, so replace it with lremovexattr.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
ltp/fsstress.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/ltp/fsstress.c b/ltp/fsstress.c
index 41b31060..ad42cb65 100644
--- a/ltp/fsstress.c
+++ b/ltp/fsstress.c
@@ -394,7 +394,7 @@ struct print_string flag_str = {0};
void add_to_flist(int, int, int, int);
void append_pathname(pathname_t *, char *);
int attr_list_path(pathname_t *, char *, const int, int, attrlist_cursor_t *);
-int attr_remove_path(pathname_t *, const char *, int);
+int attr_remove_path(pathname_t *, const char *);
int attr_set_path(pathname_t *, const char *, const char *, const int);
void check_cwd(void);
void cleanup_flist(void);
@@ -889,18 +889,18 @@ attr_list_path(pathname_t *name,
}
int
-attr_remove_path(pathname_t *name, const char *attrname, int flags)
+attr_remove_path(pathname_t *name, const char *attrname)
{
char buf[NAME_MAX + 1];
pathname_t newname;
int rval;
- rval = attr_remove(name->path, attrname, flags);
+ rval = lremovexattr(name->path, attrname);
if (rval >= 0 || errno != ENAMETOOLONG)
return rval;
separate_pathname(name, buf, &newname);
if (chdir(buf) == 0) {
- rval = attr_remove_path(&newname, attrname, flags);
+ rval = attr_remove_path(&newname, attrname);
assert(chdir("..") == 0);
}
free_pathname(&newname);
@@ -2362,7 +2362,7 @@ attr_remove_f(int opno, long r)
free_pathname(&f);
return;
}
- e = attr_remove_path(&f, aname, ATTR_DONTFOLLOW) < 0 ? errno : 0;
+ e = attr_remove_path(&f, aname) < 0 ? errno : 0;
check_cwd();
if (v)
printf("%d/%d: attr_remove %s %s %d\n",
next prev parent reply other threads:[~2020-11-11 0:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-11 0:44 [PATCH 0/4] xfstests: fix compiler warnings with fsx/fsstress Darrick J. Wong
2020-11-11 0:44 ` [PATCH 1/4] fsx: fix strncpy usage error Darrick J. Wong
2020-11-14 10:42 ` Christoph Hellwig
2020-11-11 0:44 ` [PATCH 2/4] fsstress: stop using attr_set Darrick J. Wong
2020-11-14 10:45 ` Christoph Hellwig
2020-11-11 0:44 ` Darrick J. Wong [this message]
2020-11-14 10:45 ` [PATCH 3/4] fsstress: remove attr_remove Christoph Hellwig
2020-11-11 0:45 ` [PATCH 4/4] fsstress: get rid of attr_list Darrick J. Wong
2020-11-14 10:47 ` Christoph Hellwig
2021-02-11 21:18 ` Darrick J. Wong
2021-02-11 21:22 ` Darrick J. Wong
2020-11-15 9:12 ` [PATCH 0/4] xfstests: fix compiler warnings with fsx/fsstress Eryu Guan
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=160505549612.1389938.4557085048629140407.stgit@magnolia \
--to=darrick.wong@oracle.com \
--cc=fstests@vger.kernel.org \
--cc=guaneryu@gmail.com \
--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.