lkml.org 
[lkml]   [2010]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Introduce freeze_super and thaw_super for the fsfreeze ioctl
On Wed, Mar 24, 2010 at 09:31:51AM +1100, Nigel Cunningham wrote:
> /**
> * freeze_filesystems - lock all filesystems and force them into a
> consistent
> * state
> * @which: What combination of fuse & non-fuse to freeze.
> */
> void freeze_filesystems(int which)
> {
> struct super_block *sb;
>
> lockdep_off();
>
> /*
> * Freeze in reverse order so filesystems dependant upon others are
> * frozen in the right order (eg. loopback on ext3).
> */

[snip the horror]

a) traversing superblock list without any locking whatsoever
b) accessing superblock fields <....>
c) <.........................> without making sure that it's not
going to disappear
d) calling freeze_bdev() without any warranties that its argument
is not going to be freed under you
e) layering violations all over the place
etc.

I've stayed away from TuxOnIce flamefests and I've no idea how representative
that snippet is, but if it *does* match the general code quality in there...
Ouch.


\
 
 \ /
  Last update: 2010-03-24 00:21    [W:0.119 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site