Commit 074d730
Andreas Gruenbacher
gfs2: Silence "suspicious RCU usage in gfs2_permission" warning
Commit 0abd155 added rcu_dereference() for dereferencing ip->i_gl
in gfs2_permission. This now causes lockdep to complain when
gfs2_permission is called in non-RCU context:
WARNING: suspicious RCU usage in gfs2_permission
Switch to rcu_dereference_check() and check for the MAY_NOT_BLOCK flag
to shut up lockdep when we know that dereferencing ip->i_gl is safe.
Fixes: 0abd155 ("gfs2: fix an oops in gfs2_permission")
Reported-by: syzbot+3e5130844b0c0e2b4948@syzkaller.appspotmail.com
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>1 parent d6fc6c9 commit 074d730
1 file changed
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1867 | 1867 | | |
1868 | 1868 | | |
1869 | 1869 | | |
| 1870 | + | |
1870 | 1871 | | |
1871 | 1872 | | |
1872 | 1873 | | |
1873 | 1874 | | |
1874 | 1875 | | |
1875 | 1876 | | |
1876 | 1877 | | |
1877 | | - | |
| 1878 | + | |
1878 | 1879 | | |
1879 | 1880 | | |
1880 | | - | |
| 1881 | + | |
1881 | 1882 | | |
1882 | 1883 | | |
1883 | 1884 | | |
1884 | | - | |
| 1885 | + | |
1885 | 1886 | | |
1886 | 1887 | | |
1887 | 1888 | | |
| |||
0 commit comments