Skip to content

Commit 70772ca

Browse files
author
Al Viro
committed
file_[gs]etattr(2): switch to CLASS(filename_maybe_null)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 5b9d406 commit 70772ca

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

fs/file_attr.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,6 @@ SYSCALL_DEFINE5(file_getattr, int, dfd, const char __user *, filename,
374374
unsigned int, at_flags)
375375
{
376376
struct path filepath __free(path_put) = {};
377-
struct filename *name __free(putname) = NULL;
378377
unsigned int lookup_flags = 0;
379378
struct file_attr fattr;
380379
struct file_kattr fa;
@@ -395,7 +394,7 @@ SYSCALL_DEFINE5(file_getattr, int, dfd, const char __user *, filename,
395394
if (usize < FILE_ATTR_SIZE_VER0)
396395
return -EINVAL;
397396

398-
name = getname_maybe_null(filename, at_flags);
397+
CLASS(filename_maybe_null, name)(filename, at_flags);
399398
if (!name && dfd >= 0) {
400399
CLASS(fd, f)(dfd);
401400
if (fd_empty(f))
@@ -428,7 +427,6 @@ SYSCALL_DEFINE5(file_setattr, int, dfd, const char __user *, filename,
428427
unsigned int, at_flags)
429428
{
430429
struct path filepath __free(path_put) = {};
431-
struct filename *name __free(putname) = NULL;
432430
unsigned int lookup_flags = 0;
433431
struct file_attr fattr;
434432
struct file_kattr fa;
@@ -458,7 +456,7 @@ SYSCALL_DEFINE5(file_setattr, int, dfd, const char __user *, filename,
458456
if (error)
459457
return error;
460458

461-
name = getname_maybe_null(filename, at_flags);
459+
CLASS(filename_maybe_null, name)(filename, at_flags);
462460
if (!name && dfd >= 0) {
463461
CLASS(fd, f)(dfd);
464462
if (fd_empty(f))

0 commit comments

Comments
 (0)