]> git.baikalelectronics.ru Git - kernel.git/commit
nilfs2: fix misuse of a semaphore in sysfs code
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Tue, 2 Aug 2016 21:05:25 +0000 (14:05 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 2 Aug 2016 23:35:20 +0000 (19:35 -0400)
commitedab8ee592b6ada6a81d60db7049a018ab82ea16
tree4758726d573e01f8861e31a0b29eeb434e57af2c
parentb7453b1e80de33e9b6a0ac010914c5cf814e0634
nilfs2: fix misuse of a semaphore in sysfs code

Variables ns_seg_seq, ns_segnum, ns_nextnum, ns_pseg_offset, ns_cno,
ns_ctime, ns_nongc_ctime, and ns_ndirtyblks, are protected by
ns_segctor_sem, but ns_sem is wrongly used by the nilfs sysfs code when
reading these variables.  This fixes the misuse and clarifies which
semaphore protects them in the comment of the_nilfs struct.

Link: http://lkml.kernel.org/r/1465825507-3407-2-git-send-email-konishi.ryusuke@lab.ntt.co.jp
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/nilfs2/sysfs.c
fs/nilfs2/the_nilfs.h