Skip to content

Commit 5facae4

Browse files
Qian Caiingomolnar
authored andcommitted
locking/lockdep: Remove unused @nested argument from lock_release()
Since the following commit: b4adfe8 ("locking/lockdep: Remove unused argument in __lock_release") @nested is no longer used in lock_release(), so remove it from all lock_release() calls and friends. Signed-off-by: Qian Cai <cai@lca.pw> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Will Deacon <will@kernel.org> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: airlied@linux.ie Cc: akpm@linux-foundation.org Cc: alexander.levin@microsoft.com Cc: daniel@iogearbox.net Cc: davem@davemloft.net Cc: dri-devel@lists.freedesktop.org Cc: duyuyang@gmail.com Cc: gregkh@linuxfoundation.org Cc: hannes@cmpxchg.org Cc: intel-gfx@lists.freedesktop.org Cc: jack@suse.com Cc: jlbec@evilplan.or Cc: joonas.lahtinen@linux.intel.com Cc: joseph.qi@linux.alibaba.com Cc: jslaby@suse.com Cc: juri.lelli@redhat.com Cc: maarten.lankhorst@linux.intel.com Cc: mark@fasheh.com Cc: mhocko@kernel.org Cc: mripard@kernel.org Cc: ocfs2-devel@oss.oracle.com Cc: rodrigo.vivi@intel.com Cc: sean@poorly.run Cc: st@kernel.org Cc: tj@kernel.org Cc: tytso@mit.edu Cc: vdavydov.dev@gmail.com Cc: vincent.guittot@linaro.org Cc: viro@zeniv.linux.org.uk Link: https://lkml.kernel.org/r/1568909380-32199-1-git-send-email-cai@lca.pw Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent e950cca commit 5facae4

33 files changed

Lines changed: 90 additions & 93 deletions

‎drivers/gpu/drm/drm_connector.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ void drm_connector_list_iter_end(struct drm_connector_list_iter *iter)
719719
__drm_connector_put_safe(iter->conn);
720720
spin_unlock_irqrestore(&config->connector_list_lock, flags);
721721
}
722-
lock_release(&connector_list_iter_dep_map, 0, _RET_IP_);
722+
lock_release(&connector_list_iter_dep_map, _RET_IP_);
723723
}
724724
EXPORT_SYMBOL(drm_connector_list_iter_end);
725725

‎drivers/gpu/drm/i915/gem/i915_gem_shrinker.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -509,14 +509,14 @@ void i915_gem_shrinker_taints_mutex(struct drm_i915_private *i915,
509509
I915_MM_SHRINKER, 0, _RET_IP_);
510510

511511
mutex_acquire(&mutex->dep_map, 0, 0, _RET_IP_);
512-
mutex_release(&mutex->dep_map, 0, _RET_IP_);
512+
mutex_release(&mutex->dep_map, _RET_IP_);
513513

514-
mutex_release(&i915->drm.struct_mutex.dep_map, 0, _RET_IP_);
514+
mutex_release(&i915->drm.struct_mutex.dep_map, _RET_IP_);
515515

516516
fs_reclaim_release(GFP_KERNEL);
517517

518518
if (unlock)
519-
mutex_release(&i915->drm.struct_mutex.dep_map, 0, _RET_IP_);
519+
mutex_release(&i915->drm.struct_mutex.dep_map, _RET_IP_);
520520
}
521521

522522
#define obj_to_i915(obj__) to_i915((obj__)->base.dev)

‎drivers/gpu/drm/i915/gt/intel_engine_pm.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ static inline unsigned long __timeline_mark_lock(struct intel_context *ce)
5252
static inline void __timeline_mark_unlock(struct intel_context *ce,
5353
unsigned long flags)
5454
{
55-
mutex_release(&ce->timeline->mutex.dep_map, 0, _THIS_IP_);
55+
mutex_release(&ce->timeline->mutex.dep_map, _THIS_IP_);
5656
local_irq_restore(flags);
5757
}
5858

‎drivers/gpu/drm/i915/i915_request.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1456,7 +1456,7 @@ long i915_request_wait(struct i915_request *rq,
14561456
dma_fence_remove_callback(&rq->fence, &wait.cb);
14571457

14581458
out:
1459-
mutex_release(&rq->engine->gt->reset.mutex.dep_map, 0, _THIS_IP_);
1459+
mutex_release(&rq->engine->gt->reset.mutex.dep_map, _THIS_IP_);
14601460
trace_i915_request_wait_end(rq);
14611461
return timeout;
14621462
}

‎drivers/tty/tty_ldsem.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ static int __ldsem_down_read_nested(struct ld_semaphore *sem,
303303
if (count <= 0) {
304304
lock_contended(&sem->dep_map, _RET_IP_);
305305
if (!down_read_failed(sem, count, timeout)) {
306-
rwsem_release(&sem->dep_map, 1, _RET_IP_);
306+
rwsem_release(&sem->dep_map, _RET_IP_);
307307
return 0;
308308
}
309309
}
@@ -322,7 +322,7 @@ static int __ldsem_down_write_nested(struct ld_semaphore *sem,
322322
if ((count & LDSEM_ACTIVE_MASK) != LDSEM_ACTIVE_BIAS) {
323323
lock_contended(&sem->dep_map, _RET_IP_);
324324
if (!down_write_failed(sem, count, timeout)) {
325-
rwsem_release(&sem->dep_map, 1, _RET_IP_);
325+
rwsem_release(&sem->dep_map, _RET_IP_);
326326
return 0;
327327
}
328328
}
@@ -390,7 +390,7 @@ void ldsem_up_read(struct ld_semaphore *sem)
390390
{
391391
long count;
392392

393-
rwsem_release(&sem->dep_map, 1, _RET_IP_);
393+
rwsem_release(&sem->dep_map, _RET_IP_);
394394

395395
count = atomic_long_add_return(-LDSEM_READ_BIAS, &sem->count);
396396
if (count < 0 && (count & LDSEM_ACTIVE_MASK) == 0)
@@ -404,7 +404,7 @@ void ldsem_up_write(struct ld_semaphore *sem)
404404
{
405405
long count;
406406

407-
rwsem_release(&sem->dep_map, 1, _RET_IP_);
407+
rwsem_release(&sem->dep_map, _RET_IP_);
408408

409409
count = atomic_long_add_return(-LDSEM_WRITE_BIAS, &sem->count);
410410
if (count < 0)

‎fs/dcache.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1319,7 +1319,7 @@ static void d_walk(struct dentry *parent, void *data,
13191319

13201320
if (!list_empty(&dentry->d_subdirs)) {
13211321
spin_unlock(&this_parent->d_lock);
1322-
spin_release(&dentry->d_lock.dep_map, 1, _RET_IP_);
1322+
spin_release(&dentry->d_lock.dep_map, _RET_IP_);
13231323
this_parent = dentry;
13241324
spin_acquire(&this_parent->d_lock.dep_map, 0, 1, _RET_IP_);
13251325
goto repeat;

‎fs/jbd2/transaction.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ int jbd2__journal_restart(handle_t *handle, int nblocks, gfp_t gfp_mask)
713713
if (need_to_start)
714714
jbd2_log_start_commit(journal, tid);
715715

716-
rwsem_release(&journal->j_trans_commit_map, 1, _THIS_IP_);
716+
rwsem_release(&journal->j_trans_commit_map, _THIS_IP_);
717717
handle->h_buffer_credits = nblocks;
718718
/*
719719
* Restore the original nofs context because the journal restart
@@ -1848,7 +1848,7 @@ int jbd2_journal_stop(handle_t *handle)
18481848
wake_up(&journal->j_wait_transaction_locked);
18491849
}
18501850

1851-
rwsem_release(&journal->j_trans_commit_map, 1, _THIS_IP_);
1851+
rwsem_release(&journal->j_trans_commit_map, _THIS_IP_);
18521852

18531853
if (wait_for_commit)
18541854
err = jbd2_log_wait_commit(journal, tid);

‎fs/kernfs/dir.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ void kernfs_put_active(struct kernfs_node *kn)
438438
return;
439439

440440
if (kernfs_lockdep(kn))
441-
rwsem_release(&kn->dep_map, 1, _RET_IP_);
441+
rwsem_release(&kn->dep_map, _RET_IP_);
442442
v = atomic_dec_return(&kn->active);
443443
if (likely(v != KN_DEACTIVATED_BIAS))
444444
return;
@@ -476,7 +476,7 @@ static void kernfs_drain(struct kernfs_node *kn)
476476

477477
if (kernfs_lockdep(kn)) {
478478
lock_acquired(&kn->dep_map, _RET_IP_);
479-
rwsem_release(&kn->dep_map, 1, _RET_IP_);
479+
rwsem_release(&kn->dep_map, _RET_IP_);
480480
}
481481

482482
kernfs_drain_open_files(kn);

‎fs/ocfs2/dlmglue.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1687,7 +1687,7 @@ static void __ocfs2_cluster_unlock(struct ocfs2_super *osb,
16871687
spin_unlock_irqrestore(&lockres->l_lock, flags);
16881688
#ifdef CONFIG_DEBUG_LOCK_ALLOC
16891689
if (lockres->l_lockdep_map.key != NULL)
1690-
rwsem_release(&lockres->l_lockdep_map, 1, caller_ip);
1690+
rwsem_release(&lockres->l_lockdep_map, caller_ip);
16911691
#endif
16921692
}
16931693

‎include/linux/jbd2.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1170,7 +1170,7 @@ struct journal_s
11701170
#define jbd2_might_wait_for_commit(j) \
11711171
do { \
11721172
rwsem_acquire(&j->j_trans_commit_map, 0, 0, _THIS_IP_); \
1173-
rwsem_release(&j->j_trans_commit_map, 1, _THIS_IP_); \
1173+
rwsem_release(&j->j_trans_commit_map, _THIS_IP_); \
11741174
} while (0)
11751175

11761176
/* journal feature predicate functions */

0 commit comments

Comments
 (0)