summaryrefslogtreecommitdiff
path: root/fs/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/buffer.c')
-rw-r--r--fs/buffer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index 4fe7c935e4d6..cb06b5454e36 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -937,9 +937,11 @@ try_again:
head = NULL;
offset = PAGE_SIZE;
while ((offset -= size) >= 0) {
+ int pf_flags = current->flags;
+
current->flags |= PF_NOWARN;
bh = alloc_buffer_head();
- current->flags &= ~PF_NOWARN;
+ current->flags = pf_flags;
if (!bh)
goto no_grow;