Home
last modified time | relevance | path

Searched refs:i_rwsem (Results 1 – 25 of 30) sorted by relevance

12

/Linux-v6.6/fs/ceph/
Dio.c24 lockdep_assert_held_write(&inode->i_rwsem); in ceph_block_o_direct()
56 down_read(&inode->i_rwsem); in ceph_start_io_read()
59 up_read(&inode->i_rwsem); in ceph_start_io_read()
61 down_write(&inode->i_rwsem); in ceph_start_io_read()
63 downgrade_write(&inode->i_rwsem); in ceph_start_io_read()
76 up_read(&inode->i_rwsem); in ceph_end_io_read()
89 down_write(&inode->i_rwsem); in ceph_start_io_write()
103 up_write(&inode->i_rwsem); in ceph_end_io_write()
109 lockdep_assert_held_write(&inode->i_rwsem); in ceph_block_buffered()
142 down_read(&inode->i_rwsem); in ceph_start_io_direct()
[all …]
/Linux-v6.6/fs/nfs/
Dio.c47 down_read(&inode->i_rwsem); in nfs_start_io_read()
50 up_read(&inode->i_rwsem); in nfs_start_io_read()
52 down_write(&inode->i_rwsem); in nfs_start_io_read()
54 downgrade_write(&inode->i_rwsem); in nfs_start_io_read()
67 up_read(&inode->i_rwsem); in nfs_end_io_read()
80 down_write(&inode->i_rwsem); in nfs_start_io_write()
94 up_write(&inode->i_rwsem); in nfs_end_io_write()
127 down_read(&inode->i_rwsem); in nfs_start_io_direct()
130 up_read(&inode->i_rwsem); in nfs_start_io_direct()
132 down_write(&inode->i_rwsem); in nfs_start_io_direct()
[all …]
/Linux-v6.6/fs/orangefs/
Dfile.c329 down_read(&file_inode(iocb->ki_filp)->i_rwsem); in orangefs_file_read_iter()
336 up_read(&file_inode(iocb->ki_filp)->i_rwsem); in orangefs_file_read_iter()
349 down_read(&inode->i_rwsem); in orangefs_file_splice_read()
356 up_read(&inode->i_rwsem); in orangefs_file_splice_read()
/Linux-v6.6/fs/
Dreaddir.c55 up_read(&inode->i_rwsem); in wrap_directory_iterator()
56 down_write(&inode->i_rwsem); in wrap_directory_iterator()
69 downgrade_write(&inode->i_rwsem); in wrap_directory_iterator()
99 res = down_read_killable(&inode->i_rwsem); in iterate_dir()
Dinode.c198 init_rwsem(&inode->i_rwsem); in inode_init_always()
199 lockdep_set_class(&inode->i_rwsem, &sb->s_type->i_mutex_key); in inode_init_always()
1044 if (lockdep_match_class(&inode->i_rwsem, &type->i_mutex_key)) { in lockdep_annotate_inode_mutex_key()
1049 init_rwsem(&inode->i_rwsem); in lockdep_annotate_inode_mutex_key()
1050 lockdep_set_class(&inode->i_rwsem, in lockdep_annotate_inode_mutex_key()
Ddax.c1564 lockdep_assert_held_write(&iomi.inode->i_rwsem); in dax_iomap_rw()
1567 lockdep_assert_held(&iomi.inode->i_rwsem); in dax_iomap_rw()
Dlibfs.c474 lockdep_assert_held(&d_inode(dir)->i_rwsem); in offset_readdir()
/Linux-v6.6/Documentation/filesystems/
Ddirectory-locking.rst7 kinds of locks - per-inode (->i_rwsem) and per-filesystem
10 When taking the i_rwsem on multiple non-directory objects, we
59 All ->i_rwsem are taken exclusive. Again, we might get away with locking
96 Thus all processes are blocked on ->i_rwsem.
Dlocking.rst94 ops i_rwsem(inode)
123 Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_rwsem
148 ops i_rwsem(inode)
273 ops folio locked i_rwsem invalidate_lock
562 ->iterate_shared() is called with i_rwsem held for reading, and with the
597 blocking changes through write(2) and similar operations inode->i_rwsem can be
Dpath-lookup.rst246 inode->i_rwsem
249 ``i_rwsem`` is a read/write semaphore that serializes all changes to a particular
256 This has a complementary role to that of ``d_lock``: ``i_rwsem`` on a
259 dcache hold ``i_rwsem`` on the relevant directory inode and briefly take
262 memory pressure. This uses ``d_lock``, but ``i_rwsem`` plays no role.
268 falls back to ``lookup_slow()`` which takes a shared lock on ``i_rwsem``, checks again that
274 sometimes need to take an exclusive lock on ``i_rwsem`` before performing the last lookup so
276 to take, or not take, ``i_rwsem`` is one of the
280 name that is not yet in the dcache - the shared lock on ``i_rwsem`` will
287 ``i_rwsem``, a thread must call ``d_alloc_parallel()``. This allocates a
[all …]
Dgfs2-glocks.rst115 1. i_rwsem (if required)
/Linux-v6.6/fs/xfs/scrub/
Dxfile.c95 lockdep_set_class(&inode->i_rwsem, &xfile_i_mutex_key); in xfile_create()
115 lockdep_set_class(&inode->i_rwsem, &inode->i_sb->s_type->i_mutex_key); in xfile_destroy()
/Linux-v6.6/fs/xfs/
Dxfs_inode.c195 down_write_nested(&VFS_I(ip)->i_rwsem, in xfs_ilock()
198 down_read_nested(&VFS_I(ip)->i_rwsem, in xfs_ilock()
238 if (!down_write_trylock(&VFS_I(ip)->i_rwsem)) in xfs_ilock_nowait()
241 if (!down_read_trylock(&VFS_I(ip)->i_rwsem)) in xfs_ilock_nowait()
269 up_write(&VFS_I(ip)->i_rwsem); in xfs_ilock_nowait()
271 up_read(&VFS_I(ip)->i_rwsem); in xfs_ilock_nowait()
296 up_write(&VFS_I(ip)->i_rwsem); in xfs_iunlock()
298 up_read(&VFS_I(ip)->i_rwsem); in xfs_iunlock()
331 downgrade_write(&VFS_I(ip)->i_rwsem); in xfs_ilock_demote()
374 return __xfs_rwsem_islocked(&VFS_I(ip)->i_rwsem, in xfs_isilocked()
Dxfs_iops.c1286 lockdep_set_class(&inode->i_rwsem, in xfs_setup_inode()
Dxfs_icache.c359 ASSERT(!rwsem_is_locked(&inode->i_rwsem)); in xfs_iget_recycle()
Dxfs_super.c664 ASSERT(!rwsem_is_locked(&inode->i_rwsem)); in xfs_fs_destroy_inode()
/Linux-v6.6/include/linux/
Dfs.h689 struct rw_semaphore i_rwsem; member
802 down_write(&inode->i_rwsem); in inode_lock()
807 up_write(&inode->i_rwsem); in inode_unlock()
812 down_read(&inode->i_rwsem); in inode_lock_shared()
817 up_read(&inode->i_rwsem); in inode_unlock_shared()
822 return down_write_trylock(&inode->i_rwsem); in inode_trylock()
827 return down_read_trylock(&inode->i_rwsem); in inode_trylock_shared()
832 return rwsem_is_locked(&inode->i_rwsem); in inode_is_locked()
837 down_write_nested(&inode->i_rwsem, subclass); in inode_lock_nested()
842 down_read_nested(&inode->i_rwsem, subclass); in inode_lock_shared_nested()
/Linux-v6.6/fs/configfs/
Dinode.c134 lockdep_set_class(&inode->i_rwsem, in configfs_set_inode_lock_class()
/Linux-v6.6/lib/
Dtest_lockup.c548 lock_rwsem_ptr = (unsigned long)&test_inode->i_rwsem; in test_lockup_init()
/Linux-v6.6/fs/overlayfs/
Dinode.c955 lockdep_set_class(&inode->i_rwsem, &ovl_i_mutex_dir_key[depth]); in ovl_lockdep_annotate_inode_mutex_key()
957 lockdep_set_class(&inode->i_rwsem, &ovl_i_mutex_key[depth]); in ovl_lockdep_annotate_inode_mutex_key()
Dreaddir.c276 err = down_write_killable(&dir->d_inode->i_rwsem); in ovl_check_whiteouts()
/Linux-v6.6/fs/ocfs2/
Dinode.c245 lockdep_set_class(&inode->i_rwsem, in ocfs2_init_locked_inode()
/Linux-v6.6/fs/gfs2/
Dops_fstype.c910 lockdep_set_class(&sdp->sd_quota_inode->i_rwsem, in init_inodes()
/Linux-v6.6/fs/btrfs/
Ddelayed-inode.c1742 downgrade_write(&inode->i_rwsem); in btrfs_readdir_put_delayed_items()
Dioctl.c967 error = down_write_killable_nested(&dir->i_rwsem, I_MUTEX_PARENT); in btrfs_mksubvol()
2478 err = down_write_killable_nested(&dir->i_rwsem, I_MUTEX_PARENT); in btrfs_ioctl_snap_destroy()

12