Skip to content

Commit 5aadc43

Browse files
elmarcotorvalds
authored andcommitted
shmem: rename functions that are memfd-related
Those functions are called for memfd files, backed by shmem or hugetlb (the next patches will handle hugetlb). Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Marc-André Lureau <[email protected]> Reviewed-by: Mike Kravetz <[email protected]> Cc: Andrea Arcangeli <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Michal Hocko <[email protected]> Cc: David Herrmann <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent e9d586a commit 5aadc43

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

fs/fcntl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ static long do_fcntl(int fd, unsigned int cmd, unsigned long arg,
418418
break;
419419
case F_ADD_SEALS:
420420
case F_GET_SEALS:
421-
err = shmem_fcntl(filp, cmd, arg);
421+
err = memfd_fcntl(filp, cmd, arg);
422422
break;
423423
case F_GET_RW_HINT:
424424
case F_SET_RW_HINT:

include/linux/shmem_fs.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,11 @@ extern void shmem_uncharge(struct inode *inode, long pages);
112112

113113
#ifdef CONFIG_TMPFS
114114

115-
extern long shmem_fcntl(struct file *file, unsigned int cmd, unsigned long arg);
115+
extern long memfd_fcntl(struct file *file, unsigned int cmd, unsigned long arg);
116116

117117
#else
118118

119-
static inline long shmem_fcntl(struct file *f, unsigned int c, unsigned long a)
119+
static inline long memfd_fcntl(struct file *f, unsigned int c, unsigned long a)
120120
{
121121
return -EINVAL;
122122
}

mm/shmem.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2722,7 +2722,7 @@ static int shmem_wait_for_pins(struct address_space *mapping)
27222722
F_SEAL_GROW | \
27232723
F_SEAL_WRITE)
27242724

2725-
static int shmem_add_seals(struct file *file, unsigned int seals)
2725+
static int memfd_add_seals(struct file *file, unsigned int seals)
27262726
{
27272727
struct inode *inode = file_inode(file);
27282728
struct shmem_inode_info *info = SHMEM_I(inode);
@@ -2792,15 +2792,15 @@ static int shmem_add_seals(struct file *file, unsigned int seals)
27922792
return error;
27932793
}
27942794

2795-
static int shmem_get_seals(struct file *file)
2795+
static int memfd_get_seals(struct file *file)
27962796
{
27972797
if (file->f_op != &shmem_file_operations)
27982798
return -EINVAL;
27992799

28002800
return SHMEM_I(file_inode(file))->seals;
28012801
}
28022802

2803-
long shmem_fcntl(struct file *file, unsigned int cmd, unsigned long arg)
2803+
long memfd_fcntl(struct file *file, unsigned int cmd, unsigned long arg)
28042804
{
28052805
long error;
28062806

@@ -2810,10 +2810,10 @@ long shmem_fcntl(struct file *file, unsigned int cmd, unsigned long arg)
28102810
if (arg > UINT_MAX)
28112811
return -EINVAL;
28122812

2813-
error = shmem_add_seals(file, arg);
2813+
error = memfd_add_seals(file, arg);
28142814
break;
28152815
case F_GET_SEALS:
2816-
error = shmem_get_seals(file);
2816+
error = memfd_get_seals(file);
28172817
break;
28182818
default:
28192819
error = -EINVAL;

0 commit comments

Comments
 (0)