lkml.org 
[lkml]   [2014]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] fs: make generic_block_fiemap sig-tolerant
Date
__generic_block_fiemap may spin very long time for large sparse files.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
---
fs/ioctl.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/fs/ioctl.c b/fs/ioctl.c
index 8ac3fad..6fbeb68 100644
--- a/fs/ioctl.c
+++ b/fs/ioctl.c
@@ -379,6 +379,11 @@ int __generic_block_fiemap(struct inode *inode,
past_eof = true;
}
cond_resched();
+ if (fatal_signal_pending(current)) {
+ ret = -EINTR;
+ break;
+ }
+
} while (1);

/* If ret is 1 then we just hit the end of the extent array */
--
1.7.1


\
 
 \ /
  Last update: 2014-10-17 16:01    [W:0.071 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site