Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\namespace.c Create Date:2022-07-28 20:09:09
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__mnt_want_write - get write access to a mount without freeze protection*@m: the mount on which to take a write* This tells the low-level filesystem that a write is about to be performed to* it, and makes sure that writes are allowed (mnt it read-write)

Proto:int __mnt_want_write(struct vfsmount *m)

Type:int

Parameter:

TypeParameterName
struct vfsmount *m
313  mnt = real_mount(m)
314  ret = 0
316  Even if we don't have any preemption, we need preempt disable/enable* to be barriers, so that we don't have things like get_user/put_user* that can cause faults and scheduling migrate into our preempt-protected* region.()
317  mnt_inc_writers(mnt)
323  smp_mb()
324  When READ_ONCE(mnt_flags) & MNT_WRITE_HOLD cycle
325  cpu_relax()
331  smp_rmb()
332  If mnt_is_readonly(m) Then
333  mnt_dec_writers(mnt)
334  ret = -EROFS
336  preempt_enable()
338  Return ret
Caller
NameDescribe
touch_atime
mnt_want_writemnt_want_write - get write access to a mount*@m: the mount on which to take a write* This tells the low-level filesystem that a write is about to be performed to* it, and makes sure that writes are allowed (mount is read-write, filesystem
__mnt_want_write_file__mnt_want_write_file - get write access to a file's mount*@file: the file who's mount on which to take a write* This is like __mnt_want_write, but it takes a file and can* do some optimisations if the file is open for write already