Signed-off-by: Pekka Enberg --- init/do_mounts.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) Index: 2.6/init/do_mounts.c =================================================================== --- 2.6.orig/init/do_mounts.c 2007-04-27 14:43:22.000000000 +0300 +++ 2.6/init/do_mounts.c 2007-04-27 14:43:55.000000000 +0300 @@ -139,11 +139,16 @@ dev_t name_to_dev_t(char *name) char s[32]; char *p; dev_t res = 0; - int part; + int part, mount_result; #ifdef CONFIG_SYSFS int mkdir_err = sys_mkdir("/sys", 0700); - if (sys_mount("sysfs", "/sys", "sysfs", 0, NULL) < 0) + /* + * When changing resume2 parameter for Software Suspend, sysfs may + * already be mounted. + */ + mount_result = sys_mount("sysfs", "/sys", "sysfs", 0, NULL); + if (mount_result < 0 && mount_result != -EBUSY) goto out; #endif @@ -195,7 +200,8 @@ p[-1] = '\0'; res = try_name(s, part); done: #ifdef CONFIG_SYSFS - sys_umount("/sys", 0); + if (mount_result >= 0) + sys_umount("/sys", 0); out: if (!mkdir_err) sys_rmdir("/sys");