From 20ac23d7b5793717e127fe0e7ff1c12d67f497557b126410bee784e0853456de Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 28 Nov 2008 15:08:25 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=69 --- fix-hang-on-stale-nfs.diff | 18 ++++++++++++++++++ util-linux.changes | 6 ++++++ util-linux.spec | 7 ++++++- 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 fix-hang-on-stale-nfs.diff diff --git a/fix-hang-on-stale-nfs.diff b/fix-hang-on-stale-nfs.diff new file mode 100644 index 0000000..64530c8 --- /dev/null +++ b/fix-hang-on-stale-nfs.diff @@ -0,0 +1,18 @@ +--- mount/lomount.c ++++ mount/lomount.c +@@ -109,7 +109,14 @@ static int + is_loop_used(int fd) + { + struct loop_info li; +- return ioctl (fd, LOOP_GET_STATUS, &li) == 0; ++ int ret; ++ ret = ioctl (fd, LOOP_GET_STATUS, &li); ++ if (ret == 0) ++ return 1; ++ if (ret < 0 && (errno == ENXIO)) ++ return 0; ++ /* all other errors, e.g. ENOENT or ESTALE are an error. */ ++ return -1; + } + + int diff --git a/util-linux.changes b/util-linux.changes index 3f39d58..752072f 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Nov 27 01:27:19 CET 2008 - dmueller@suse.de + +- mount: fix hang on trying to find a free loop device + if one of them has a stale nfs handle mounted (bnc#449646) + ------------------------------------------------------------------- Mon Nov 24 15:24:11 CET 2008 - mkoenig@suse.de diff --git a/util-linux.spec b/util-linux.spec index 1c1f606..627dd77 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -30,7 +30,7 @@ License: BSD 3-Clause; GPL v2 or later Group: System/Base AutoReqProv: on Version: 2.14.1 -Release: 8 +Release: 9 Requires: %name-lang = %{version} Summary: A collection of basic system utilities Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 @@ -71,6 +71,7 @@ Patch3: util-linux-2.12r-fdisk_remove_bogus_warnings.patch Patch4: util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch # Patch5: util-linux-2.13.1-fdisk_cfdisk_yesno.patch +Patch6: fix-hang-on-stale-nfs.diff Patch7: util-linux-2.14-mount_retry_on_nomedium.patch Patch8: util-linux-2.14.1-lscpu.patch Patch9: util-linux-2.14.1-lscpu_sysroot_option.patch @@ -126,6 +127,7 @@ Authors: %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 %patch7 -p1 %patch8 -p1 %patch9 -p1 @@ -609,6 +611,9 @@ fi #%endif %changelog +* Thu Nov 27 2008 dmueller@suse.de +- mount: fix hang on trying to find a free loop device + if one of them has a stale nfs handle mounted (bnc#449646) * Mon Nov 24 2008 mkoenig@suse.de - mount: fix locking patch to not break -n [bnc#447937] * Thu Nov 20 2008 mkoenig@suse.de