Re: [PATCH] Fix up swap unmount logic (#708966)

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

 



On Fri, 2011-06-03 at 09:32 -0700, Brian C. Lane wrote:
> swap was always being unmounted, even when swapoff == False

Ack. I have the exact same patch in my local tree.

> ---
>  pyanaconda/storage/__init__.py |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/pyanaconda/storage/__init__.py b/pyanaconda/storage/__init__.py
> index 9904581..b183471 100644
> --- a/pyanaconda/storage/__init__.py
> +++ b/pyanaconda/storage/__init__.py
> @@ -2149,14 +2149,15 @@ class FSSet(object):
>          self.active = True
>  
>      def umountFilesystems(self, ignoreErrors=True, swapoff=True):
> +        """ unmount filesystems, except swap if swapoff == False """
>          devices = self.mountpoints.values() + self.swapDevices
>          devices.extend([self.dev, self.devshm, self.devpts, self.sysfs,
>                          self.proc, self.usb, self.selinux])
>          devices.sort(key=lambda d: getattr(d.format, "mountpoint", None))
>          devices.reverse()
>          for device in devices:
> -            if not device.format.mountable and \
> -               (device.format.type != "swap" or swapoff):
> +            if (not device.format.mountable) or \
> +               (device.format.type == "swap" and not swapoff):
>                  continue
>  
>              device.format.teardown()


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux