diff mbox series

[3/4] fsstress: remove attr_remove

Message ID 160505549612.1389938.4557085048629140407.stgit@magnolia (mailing list archive)
State Accepted, archived
Headers show
Series xfstests: fix compiler warnings with fsx/fsstress | expand

Commit Message

Darrick J. Wong Nov. 11, 2020, 12:44 a.m. UTC
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(-)

Comments

Christoph Hellwig Nov. 14, 2020, 10:45 a.m. UTC | #1
On Tue, Nov 10, 2020 at 04:44:56PM -0800, Darrick J. Wong wrote:
> -	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",

Same comment as for the last one, otherwise looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>
diff mbox series

Patch

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",