Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern sys_memfd: Comply with our implicit naming convention;



details:   https://anonhg.NetBSD.org/src/rev/62c76413f759
branches:  trunk
changeset: 378333:62c76413f759
user:      rin <rin%NetBSD.org@localhost>
date:      Sat Jul 29 23:59:59 2023 +0000

description:
sys_memfd: Comply with our implicit naming convention;
do_memfd_truncate() --> memfd_truncate_locked(). NFC.

diffstat:

 sys/kern/sys_memfd.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (54 lines):

diff -r 14ca59cc3c9a -r 62c76413f759 sys/kern/sys_memfd.c
--- a/sys/kern/sys_memfd.c      Sat Jul 29 23:51:29 2023 +0000
+++ b/sys/kern/sys_memfd.c      Sat Jul 29 23:59:59 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sys_memfd.c,v 1.7 2023/07/29 23:51:29 rin Exp $        */
+/*     $NetBSD: sys_memfd.c,v 1.8 2023/07/29 23:59:59 rin Exp $        */
 
 /*-
  * Copyright (c) 2023 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_memfd.c,v 1.7 2023/07/29 23:51:29 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_memfd.c,v 1.8 2023/07/29 23:59:59 rin Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -60,7 +60,7 @@ static int memfd_close(file_t *);
 static int memfd_mmap(file_t *, off_t *, size_t, int, int *, int *,
     struct uvm_object **, int *);
 static int memfd_seek(file_t *, off_t, int, off_t *, int);
-static int do_memfd_truncate(file_t *, off_t);
+static int memfd_truncate_locked(file_t *, off_t);
 static int memfd_truncate(file_t *, off_t);
 
 static const struct fileops memfd_fileops = {
@@ -210,7 +210,7 @@ memfd_write(file_t *fp, off_t *offp, str
                        todo = mfd->mfd_size - *offp;
        } else if (*offp + uio->uio_resid >= mfd->mfd_size) {
                /* Grow to accommodate the write request. */
-               error = do_memfd_truncate(fp, *offp + uio->uio_resid);
+               error = memfd_truncate_locked(fp, *offp + uio->uio_resid);
                if (error != 0)
                        goto leave;
        }
@@ -406,7 +406,7 @@ leave:
 }
 
 static int
-do_memfd_truncate(file_t *fp, off_t length)
+memfd_truncate_locked(file_t *fp, off_t length)
 {
        struct memfd *mfd = fp->f_memfd;
        voff_t start, end;
@@ -452,7 +452,7 @@ memfd_truncate(file_t *fp, off_t length)
        int error;
 
        mutex_enter(&fp->f_lock);
-       error = do_memfd_truncate(fp, length);
+       error = memfd_truncate_locked(fp, length);
        mutex_exit(&fp->f_lock);
        return error;
 }



Home | Main Index | Thread Index | Old Index