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 2/4] fsstress: stop using attr_set
Date: Tue, 10 Nov 2020 16:44:49 -0800 [thread overview]
Message-ID: <160505548994.1389938.10129281247073522665.stgit@magnolia> (raw)
In-Reply-To: <160505547722.1389938.14377167906399924976.stgit@magnolia>
From: Darrick J. Wong <darrick.wong@oracle.com>
attr_set is deprecated, so replace it with lsetxattr.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
ltp/fsstress.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/ltp/fsstress.c b/ltp/fsstress.c
index 1238fcf5..41b31060 100644
--- a/ltp/fsstress.c
+++ b/ltp/fsstress.c
@@ -395,7 +395,7 @@ 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_set_path(pathname_t *, const char *, const char *, const int, int);
+int attr_set_path(pathname_t *, const char *, const char *, const int);
void check_cwd(void);
void cleanup_flist(void);
int creat_path(pathname_t *, mode_t);
@@ -909,19 +909,19 @@ attr_remove_path(pathname_t *name, const char *attrname, int flags)
int
attr_set_path(pathname_t *name, const char *attrname, const char *attrvalue,
- const int valuelength, int flags)
+ const int valuelength)
{
char buf[NAME_MAX + 1];
pathname_t newname;
int rval;
- rval = attr_set(name->path, attrname, attrvalue, valuelength, flags);
+ rval = lsetxattr(name->path, attrname, attrvalue, valuelength, 0);
if (rval >= 0 || errno != ENAMETOOLONG)
return rval;
separate_pathname(name, buf, &newname);
if (chdir(buf) == 0) {
- rval = attr_set_path(&newname, attrname, attrvalue, valuelength,
- flags);
+ rval = attr_set_path(&newname, attrname, attrvalue,
+ valuelength);
assert(chdir("..") == 0);
}
free_pathname(&newname);
@@ -2392,7 +2392,7 @@ attr_set_f(int opno, long r)
len = 1;
aval = malloc(len);
memset(aval, nameseq & 0xff, len);
- e = attr_set_path(&f, aname, aval, len, ATTR_DONTFOLLOW) < 0 ?
+ e = attr_set_path(&f, aname, aval, len) < 0 ?
errno : 0;
check_cwd();
free(aval);
next prev parent reply other threads:[~2020-11-11 0:44 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 ` Darrick J. Wong [this message]
2020-11-14 10:45 ` [PATCH 2/4] fsstress: stop using attr_set Christoph Hellwig
2020-11-11 0:44 ` [PATCH 3/4] fsstress: remove attr_remove Darrick J. Wong
2020-11-14 10:45 ` 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=160505548994.1389938.10129281247073522665.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.