/linux/fs/netfs/ |
H A D | locking.c | 57 __acquires(inode->i_rwsem) in netfs_start_io_read() 62 if (down_read_interruptible(&inode->i_rwsem) < 0) in netfs_start_io_read() 66 up_read(&inode->i_rwsem); in netfs_start_io_read() 69 if (down_write_killable(&inode->i_rwsem) < 0) in netfs_start_io_read() 72 up_write(&inode->i_rwsem); in netfs_start_io_read() 75 downgrade_write(&inode->i_rwsem); in netfs_start_io_read() 88 __releases(inode->i_rwsem) in netfs_end_io_read() 90 up_read(&inode->i_rwsem); in netfs_end_io_read() 102 __acquires(inode->i_rwsem) in netfs_start_io_write() 106 if (down_write_killable(&inode->i_rwsem) < 0) in netfs_start_io_write() [all …]
|
/linux/fs/ceph/ |
H A D | io.c | 24 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/fs/nfs/ |
H A D | io.c | 49 err = down_read_killable(&inode->i_rwsem); in nfs_start_io_read() 54 up_read(&inode->i_rwsem); in nfs_start_io_read() 57 err = down_write_killable(&inode->i_rwsem); in nfs_start_io_read() 61 downgrade_write(&inode->i_rwsem); in nfs_start_io_read() 76 up_read(&inode->i_rwsem); in nfs_end_io_read() 91 err = down_write_killable(&inode->i_rwsem); in nfs_start_io_write() 107 up_write(&inode->i_rwsem); in nfs_end_io_write() 142 err = down_read_killable(&inode->i_rwsem); in nfs_start_io_direct() 147 up_read(&inode->i_rwsem); in nfs_start_io_direct() 150 err = down_write_killable(&inode->i_rwsem); in nfs_start_io_direct() [all …]
|
/linux/Documentation/filesystems/ |
H A D | directory-locking.rst | 7 kinds of locks - per-inode (->i_rwsem) and per-filesystem 10 When taking the i_rwsem on multiple non-directory objects, we 140 * rank ->i_rwsem of non-directories on given filesystem in inode pointer 142 * put ->i_rwsem of all directories on a filesystem at the same rank, 143 lower than ->i_rwsem of any non-directory on the same filesystem. 144 * put ->s_vfs_rename_mutex at rank lower than that of any ->i_rwsem 152 2. ->i_rwsem of directories on that NFS filesystem, same rank for all 153 3. ->i_rwsem of non-directories on that filesystem, in order of 156 5. ->i_rwsem of directories on the local filesystem, same rank for all 157 6. ->i_rwsem of non-directories on local filesystem, in order of [all …]
|
H A D | locking.rst | 94 ops i_rwsem(inode) 123 Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_rwsem 126 ->unlink() and ->rename() have ->i_rwsem exclusive on all non-directories 128 ->rename() has ->i_rwsem exclusive on any subdirectory that changes parent. 151 ops i_rwsem(inode) 276 ops folio locked i_rwsem invalidate_lock 565 ->iterate_shared() is called with i_rwsem held for reading, and with the 600 blocking changes through write(2) and similar operations inode->i_rwsem can be
|
H A D | gfs2-glocks.rst | 112 1. i_rwsem (if required)
|
/linux/fs/orangefs/ |
H A D | file.c | 329 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/Documentation/filesystems/iomap/ |
H A D | operations.rst | 106 ``i_rwsem`` or ``invalidate_lock`` and updates mapping information. 188 Callers commonly take ``i_rwsem`` in either shared or exclusive mode 231 Callers typically hold ``i_rwsem`` and ``invalidate_lock`` in exclusive 242 Callers typically hold ``i_rwsem`` and ``invalidate_lock`` in exclusive 255 Callers typically hold ``i_rwsem`` and ``invalidate_lock`` in exclusive 269 It does not lock ``i_rwsem`` or ``invalidate_lock``. 492 Callers commonly hold ``i_rwsem`` in shared mode before calling this 531 Callers commonly hold ``i_rwsem`` in shared or exclusive mode before 595 Callers commonly hold ``i_rwsem`` in shared mode before calling this 617 Callers commonly hold ``i_rwsem`` in exclusive mode before calling this [all …]
|
H A D | design.rst | 111 * ``i_rwsem``: The VFS ``struct inode`` rwsemaphore. 399 For example, a filesystem might take ``i_rwsem`` before calling
|
/linux/fs/ |
H A D | readdir.c | 53 up_read(&inode->i_rwsem); in wrap_directory_iterator() 54 down_write(&inode->i_rwsem); in wrap_directory_iterator() 67 downgrade_write(&inode->i_rwsem); in wrap_directory_iterator() 101 res = down_read_killable(&inode->i_rwsem); in iterate_dir()
|
H A D | inode.c | 272 init_rwsem(&inode->i_rwsem); in inode_init_always_gfp() 273 lockdep_set_class(&inode->i_rwsem, &sb->s_type->i_mutex_key); in inode_init_always_gfp() 1207 if (lockdep_match_class(&inode->i_rwsem, &type->i_mutex_key)) { in lockdep_annotate_inode_mutex_key() 1212 init_rwsem(&inode->i_rwsem); in lockdep_annotate_inode_mutex_key() 1213 lockdep_set_class(&inode->i_rwsem, in lockdep_annotate_inode_mutex_key()
|
H A D | dax.c | 1579 lockdep_assert_held_write(&iomi.inode->i_rwsem); in dax_iomap_rw() 1582 lockdep_assert_held(&iomi.inode->i_rwsem); in dax_iomap_rw()
|
/linux/fs/xfs/scrub/ |
H A D | xfile.c | 71 lockdep_set_class(&inode->i_rwsem, &xfile_i_mutex_key); in xfile_create() 97 lockdep_set_class(&inode->i_rwsem, &inode->i_sb->s_type->i_mutex_key); in xfile_destroy()
|
/linux/fs/xfs/ |
H A D | xfs_inode.c | 149 down_write_nested(&VFS_I(ip)->i_rwsem, in xfs_ilock() 152 down_read_nested(&VFS_I(ip)->i_rwsem, in xfs_ilock() 192 if (!down_write_trylock(&VFS_I(ip)->i_rwsem)) in xfs_ilock_nowait() 195 if (!down_read_trylock(&VFS_I(ip)->i_rwsem)) in xfs_ilock_nowait() 223 up_write(&VFS_I(ip)->i_rwsem); in xfs_ilock_nowait() 225 up_read(&VFS_I(ip)->i_rwsem); in xfs_ilock_nowait() 250 up_write(&VFS_I(ip)->i_rwsem); in xfs_iunlock() 252 up_read(&VFS_I(ip)->i_rwsem); in xfs_iunlock() 285 downgrade_write(&VFS_I(ip)->i_rwsem); in xfs_ilock_demote() 310 rwsem_assert_held(&VFS_I(ip)->i_rwsem); in xfs_assert_ilocked() [all …]
|
H A D | xfs_buf_mem.c | 73 lockdep_set_class(&inode->i_rwsem, &xmbuf_i_mutex_key); in xmbuf_alloc()
|
H A D | xfs_iops.c | 1341 lockdep_set_class(&inode->i_rwsem, in xfs_setup_inode()
|
/linux/include/linux/ |
H A D | fs.h | 690 struct rw_semaphore i_rwsem; member 818 down_write(&inode->i_rwsem); in inode_lock() 823 up_write(&inode->i_rwsem); in inode_unlock() 828 down_read(&inode->i_rwsem); in inode_lock_shared() 833 up_read(&inode->i_rwsem); in inode_unlock_shared() 838 return down_write_trylock(&inode->i_rwsem); in inode_trylock() 843 return down_read_trylock(&inode->i_rwsem); in inode_trylock_shared() 848 return rwsem_is_locked(&inode->i_rwsem); in inode_is_locked() 853 down_write_nested(&inode->i_rwsem, subclass); in inode_lock_nested() 858 down_read_nested(&inode->i_rwsem, subclass); in inode_lock_shared_nested()
|
/linux/fs/ext4/ |
H A D | file.c | 313 lockdep_assert_held_write(&inode->i_rwsem); in ext4_handle_inode_extension() 339 lockdep_assert_held_write(&inode->i_rwsem); in ext4_inode_extension_cleanup()
|
/linux/lib/ |
H A D | test_lockup.c | 548 lock_rwsem_ptr = (unsigned long)&test_inode->i_rwsem; in test_lockup_init()
|
/linux/fs/btrfs/ |
H A D | btrfs_inode.h | 516 lockdep_assert_held(&inode->vfs_inode.i_rwsem); in btrfs_assert_inode_locked()
|
H A D | ioctl.c | 1001 error = down_write_killable_nested(&dir->i_rwsem, I_MUTEX_PARENT); in btrfs_mksubvol() 2519 ret = down_write_killable_nested(&dir->i_rwsem, I_MUTEX_PARENT); in btrfs_ioctl_snap_destroy() 4755 btrfs_lockdep_inode_acquire(inode, i_rwsem); in btrfs_uring_read_finished() 4870 btrfs_lockdep_inode_release(inode, i_rwsem); in btrfs_uring_read_extent()
|
/linux/fs/afs/ |
H A D | addr_prefs.c | 392 lockdep_is_held(&file_inode(file)->i_rwsem)); in afs_proc_addr_prefs_write()
|
/linux/Documentation/mm/ |
H A D | process_addrs.rst | 380 inode->i_rwsem (while writing or truncating, not reading or faulting) 411 ->i_rwsem 424 ->i_rwsem (generic_perform_write)
|
/linux/fs/bcachefs/ |
H A D | fs.c | 726 lockdep_assert_held(&inode->v.i_rwsem); in bch2_link() 1155 lockdep_assert_held(&inode->v.i_rwsem); in bch2_setattr()
|
H A D | fs-io-buffered.c | 741 lockdep_assert_held(&inode->v.i_rwsem); in bch2_write_end()
|