linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] return EINVAL when thawing unfrozen filesystems
@ 2010-07-28 19:10 Eric Sandeen
  2010-07-29  8:07 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Sandeen @ 2010-07-28 19:10 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: Christoph Hellwig

The iterate_supers() loop in do_thaw_all() assumes
that we can call thaw_bdev() until we hit an error; when
I wrote this, we got -EINVAL when requesting a thaw of
an unfrozen bdev.  (it called until error because we
may have nested freezes).

However, commit 4504230a (freeze_bdev: grab active
reference to frozen superblocks) changed this so that
we get a return of 0 in this case, and do_thaw_all()
spins forever when an emergency system-wide thaw
is requested.

It looks to me like the change was inadvertent,
so this patch changes it back.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

diff --git a/fs/block_dev.c b/fs/block_dev.c
index 99d6af8..51500f6 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -291,7 +291,7 @@ int thaw_bdev(struct block_device *bdev, struct super_block *sb)
 	}
 out:
 	mutex_unlock(&bdev->bd_fsfreeze_mutex);
-	return 0;
+	return error;
 }
 EXPORT_SYMBOL(thaw_bdev);
 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] return EINVAL when thawing unfrozen filesystems
  2010-07-28 19:10 [PATCH] return EINVAL when thawing unfrozen filesystems Eric Sandeen
@ 2010-07-29  8:07 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2010-07-29  8:07 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: linux-fsdevel, Christoph Hellwig

On Wed, Jul 28, 2010 at 02:10:34PM -0500, Eric Sandeen wrote:
> The iterate_supers() loop in do_thaw_all() assumes
> that we can call thaw_bdev() until we hit an error; when
> I wrote this, we got -EINVAL when requesting a thaw of
> an unfrozen bdev.  (it called until error because we
> may have nested freezes).
> 
> However, commit 4504230a (freeze_bdev: grab active
> reference to frozen superblocks) changed this so that
> we get a return of 0 in this case, and do_thaw_all()
> spins forever when an emergency system-wide thaw
> is requested.
> 
> It looks to me like the change was inadvertent,
> so this patch changes it back.
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>

Looks good,


Reviewed-by: Christoph Hellwig <hch@lst.de>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-07-29  8:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-28 19:10 [PATCH] return EINVAL when thawing unfrozen filesystems Eric Sandeen
2010-07-29  8:07 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).