Lines Matching refs:mutex
43 static inline struct mutex *kernfs_open_file_mutex_ptr(struct kernfs_node *kn)
50 static inline struct mutex *kernfs_open_file_mutex_lock(struct kernfs_node *kn)
52 struct mutex *lock;
82 * the caller guarantees that this mutex is being held, other updaters can't
151 * @of->mutex nests outside active ref and is primarily to ensure that
154 mutex_lock(&of->mutex);
196 mutex_unlock(&of->mutex);
237 * @of->mutex nests outside active ref and is used both to ensure that
240 mutex_lock(&of->mutex);
243 mutex_unlock(&of->mutex);
256 mutex_unlock(&of->mutex);
322 * @of->mutex nests outside active ref and is used both to ensure that
325 mutex_lock(&of->mutex);
327 mutex_unlock(&of->mutex);
339 mutex_unlock(&of->mutex);
446 * mmap path and of->mutex are prone to triggering spurious lockdep
449 * without grabbing @of->mutex by testing HAS_MMAP flag. See the
455 mutex_lock(&of->mutex);
495 mutex_unlock(&of->mutex);
518 struct mutex *mutex;
520 mutex = kernfs_open_file_mutex_lock(kn);
527 mutex_unlock(mutex);
540 mutex_unlock(mutex);
563 struct mutex *mutex;
565 mutex = kernfs_open_file_mutex_lock(kn);
569 mutex_unlock(mutex);
589 mutex_unlock(mutex);
629 * @of->mutex for files which implement mmap. This is a rather
631 * mm->mmap_lock - mmap nests @of->mutex under mm->mmap_lock and
633 * which mm->mmap_lock nests, while holding @of->mutex. As each
634 * open file has a separate mutex, it's okay as long as those don't
645 * look that way and give @of->mutex different static lockdep keys.
648 mutex_init(&of->mutex);
650 mutex_init(&of->mutex);
652 mutex_init(&of->mutex);
705 /* nobody has access to @of yet, skip @of->mutex */
734 * @kernfs_open_file_mutex_ptr(kn) is enough. @of->mutex can't be used
758 struct mutex *mutex;
760 mutex = kernfs_open_file_mutex_lock(kn);
762 mutex_unlock(mutex);
796 struct mutex *mutex;
798 mutex = kernfs_open_file_mutex_lock(kn);
801 mutex_unlock(mutex);
819 mutex_unlock(mutex);
873 * @of->mutex nests outside active ref and is primarily to ensure that
876 mutex_lock(&of->mutex);
878 mutex_unlock(&of->mutex);
889 mutex_unlock(&of->mutex);