sdcardfs: should use spin_lock instead of mutex in rcu

This patch fixes wrong usage of mutex in rcu.

[  398.181936] c1  10801  dump_stack+0xb8/0x110
[  398.181943] c1  10801  panic+0x130/0x290
[  398.181950] c1  10801  __stack_chk_fail+0x0/0x50
[  398.181956] c1  10801  report_bug+0x148/0x184
[  398.181962] c1  10801  bug_handler+0x28/0x84
[  398.181968] c1  10801  brk_handler+0x80/0x170
[  398.181974] c1  10801  do_debug_exception+0xc4/0x16c
[  398.181979] c1  10801  el1_dbg+0x18/0x74
[  398.181985] c1  10801  rcu_note_context_switch+0x46c/0x4fc
[  398.181993] c1  10801  __schedule+0xe0/0xb9c
[  398.181999] c1  10801  schedule_preempt_disabled+0x7c/0xa8
[  398.182005] c1  10801  __mutex_lock+0x294/0x494
[  398.182011] c1  10801  __mutex_lock_slowpath+0x10/0x18
[  398.182017] c1  10801  mutex_lock+0x2c/0x34
[  398.182024] c1  10801  sdcardfs_permission+0xa0/0x23c
[  398.182032] c1  10801  __inode_permission2+0x94/0xdc
[  398.182039] c1  10801  link_path_walk+0xf8/0x518
[  398.182045] c1  10801  path_lookupat+0x54/0x214
[  398.182051] c1  10801  filename_lookup+0x8c/0x194
[  398.182057] c1  10801  user_path_at_empty+0x44/0x54
[  398.182063] c1  10801  vfs_statx+0x84/0x124
[  398.182069] c1  10801  SyS_newfstatat+0x30/0x6c

Bug: 170596516
Fixes: 6a5a0f272a59 ("sdcardfs: fix stale permission error")
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: I237d7f6f93dd400ed9cac524bbeca2b4114a78d8
4 files changed