lkml.org 
[lkml]   [2009]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v3 11/27] core: rename setrlimit to do_setrlimit
    Date
    Rename it so that it makes more sense in the field of syscalls
    (i.e. do_* is used for functions called by syscall wrappers but
    also when called from other paths).

    Signed-off-by: Jiri Slaby <jslaby@suse.cz>
    Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
    Cc: James Morris <jmorris@namei.org>
    Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Ingo Molnar <mingo@elte.hu>
    ---
    fs/proc/base.c | 2 +-
    include/linux/resource.h | 2 +-
    kernel/sys.c | 4 ++--
    3 files changed, 4 insertions(+), 4 deletions(-)

    diff --git a/fs/proc/base.c b/fs/proc/base.c
    index 78c0367..9fdb990 100644
    --- a/fs/proc/base.c
    +++ b/fs/proc/base.c
    @@ -589,7 +589,7 @@ static ssize_t limits_write(struct file *file, const char __user *buf,
    goto put_task;
    }

    - ret = setrlimit(task, i, &new_rlimit);
    + ret = do_setrlimit(task, i, &new_rlimit);
    if (ret)
    count = ret;

    diff --git a/include/linux/resource.h b/include/linux/resource.h
    index 4301d67..08beb1a 100644
    --- a/include/linux/resource.h
    +++ b/include/linux/resource.h
    @@ -71,7 +71,7 @@ struct rlimit {
    #include <asm/resource.h>

    int getrusage(struct task_struct *p, int who, struct rusage __user *ru);
    -int setrlimit(struct task_struct *tsk, unsigned int resource,
    +int do_setrlimit(struct task_struct *tsk, unsigned int resource,
    struct rlimit *new_rlim);

    #endif
    diff --git a/kernel/sys.c b/kernel/sys.c
    index 0f86199..fad6010 100644
    --- a/kernel/sys.c
    +++ b/kernel/sys.c
    @@ -1239,7 +1239,7 @@ SYSCALL_DEFINE2(old_getrlimit, unsigned int, resource,
    #endif

    /* make sure you are allowed to change @tsk limits before calling this */
    -int setrlimit(struct task_struct *tsk, unsigned int resource,
    +int do_setrlimit(struct task_struct *tsk, unsigned int resource,
    struct rlimit *new_rlim)
    {
    struct rlimit *old_rlim;
    @@ -1308,7 +1308,7 @@ SYSCALL_DEFINE2(setrlimit, unsigned int, resource, struct rlimit __user *, rlim)
    return -EINVAL;
    if (copy_from_user(&new_rlim, rlim, sizeof(*rlim)))
    return -EFAULT;
    - return setrlimit(current, resource, &new_rlim);
    + return do_setrlimit(current, resource, &new_rlim);
    }

    /*
    --
    1.6.5.3


    \
     
     \ /
      Last update: 2009-11-28 00:25    [W:0.030 / U:62.540 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site