A spin lock is taken here so we should use GFP_ATOMIC.
Fixes: 2409a976a299 ("pnfs: Add LAYOUTGET to OPEN of a new file")
Signed-off-by: Wei Yongjun <[email protected]>
---
fs/nfs/pnfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index d93942f..1ff1998 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -2009,7 +2009,7 @@ struct pnfs_layout_segment *
struct pnfs_layout_hdr *lo;
spin_lock(&ino->i_lock);
- lo = pnfs_find_alloc_layout(ino, ctx, GFP_KERNEL);
+ lo = pnfs_find_alloc_layout(ino, ctx, GFP_ATOMIC);
if (!lo)
goto out_unlock;
if (!test_bit(NFS_LAYOUT_INVALID_STID, &lo->plh_flags))
T24gV2VkLCAyMDE4LTA2LTA2IGF0IDAyOjAyICswMDAwLCBXZWkgWW9uZ2p1biB3cm90ZToNCj4g
QSBzcGluIGxvY2sgaXMgdGFrZW4gaGVyZSBzbyB3ZSBzaG91bGQgdXNlIEdGUF9BVE9NSUMuDQo+
IA0KPiBGaXhlczogMjQwOWE5NzZhMjk5ICgicG5mczogQWRkIExBWU9VVEdFVCB0byBPUEVOIG9m
IGEgbmV3IGZpbGUiKQ0KPiBTaWduZWQtb2ZmLWJ5OiBXZWkgWW9uZ2p1biA8d2VpeW9uZ2p1bjFA
aHVhd2VpLmNvbT4NCj4gLS0tDQo+ICBmcy9uZnMvcG5mcy5jIHwgMiArLQ0KPiAgMSBmaWxlIGNo
YW5nZWQsIDEgaW5zZXJ0aW9uKCspLCAxIGRlbGV0aW9uKC0pDQo+IA0KPiBkaWZmIC0tZ2l0IGEv
ZnMvbmZzL3BuZnMuYyBiL2ZzL25mcy9wbmZzLmMNCj4gaW5kZXggZDkzOTQyZi4uMWZmMTk5OCAx
MDA2NDQNCj4gLS0tIGEvZnMvbmZzL3BuZnMuYw0KPiArKysgYi9mcy9uZnMvcG5mcy5jDQo+IEBA
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