[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH master f13-branch] Suppress failures to tear down /dev/loop devices (#591829)



On 05/17/2010 10:23 PM, Brian C. Lane wrote:
Per comment #1: tearing down the loop device may or may not succeed
due to lazy unmounting of filesystem.
---
  loader/undomounts.c |    3 +--
  1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/loader/undomounts.c b/loader/undomounts.c
index af5caaa..81eed85 100644
--- a/loader/undomounts.c
+++ b/loader/undomounts.c
@@ -111,8 +111,7 @@ void undoLoop(struct unmountInfo * fs, int numFs, int this) {
      if ((fd = open("/tmp/loop", O_RDONLY, 0))<  0) {
  	printf(" failed to open device: %d", errno);
      } else {
-	if (ioctl(fd, LOOP_CLR_FD, 0))
-	    printf(" LOOP_CLR_FD failed: %d", errno);
+	ioctl(fd, LOOP_CLR_FD, 0);
  	close(fd);
      }


Ack.

I can never under why kernel doesn't tear down the loop device itself when we unmount the device it is backing.

Ales


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]