]> git.baikalelectronics.ru Git - kernel.git/commit
GFS2: Use GFP_NOFS when allocating glocks
authorSteven Whitehouse <swhiteho@redhat.com>
Mon, 23 Jun 2014 13:50:20 +0000 (14:50 +0100)
committerSteven Whitehouse <swhiteho@redhat.com>
Fri, 18 Jul 2014 10:13:12 +0000 (11:13 +0100)
commitf4c8146ba3ccc802a5129214097e090254213b0c
tree56d4873a1ae1f42c98c5ad408fdb9feaae33339f
parentaef7e884f27305d0804ae9ce9e44cfbc44db52bd
GFS2: Use GFP_NOFS when allocating glocks

Normally GFP_KERNEL is ok here, but there is now a rarely used code path
relating to deallocation of unlinked inodes (in certain corner cases)
which if hit at times of memory shortage can cause recursion while
trying to free memory.

One solution would be to try and move the gfs2_glock_get() call so
that it is no longer called while another glock is held, but that
doesn't look at all easy, so GFP_NOFS is the best solution for the
time being.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/glock.c