Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\slab.c Create Date:2022-07-28 15:46:27
Last Modify:2022-05-23 17:02:55 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:slabinfo_write - Tuning for the slab allocator*@file: unused*@buffer: user buffer*@count: data length*@ppos: unused* Return: %0 on success, negative error code otherwise.

Proto:ssize_t slabinfo_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos)

Type:ssize_t

Parameter:

TypeParameterName
struct file *file
const char __user *buffer
size_tcount
loff_t *ppos
4171  If count > MAX_SLABINFO_WRITE Then Return -EINVAL
4173  If copy_from_user( & kbuf, buffer, count) Then Return -EFAULT
4175  kbuf[MAX_SLABINFO_WRITE] = '\0'
4177  tmp = strchr(kbuf, ' ')
4178  If Not tmp Then Return -EINVAL
4180  tmp = '\0'
4181  tmp++
4182  If sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments != 3 Then Return -EINVAL
4186  mutex_lock( & slab_mutex)
4187  res = -EINVAL
4189  If Not strcmp(Name (only for display!) , kbuf) Then
4190  If limit < 1 || batchcount < 1 || batchcount > limit || shared < 0 Then
4192  res = 0
4193  Else
4198  Break
4201  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
4202  If res >= 0 Then res = count
4204  Return res