From mboxrd@z Thu Jan 1 00:00:00 1970 From: Francis Moreau Subject: sys_umount() returns EBUSY when doing: sh -c "mount /dev/sdc1 /mnt; umount /mnt" Date: Sat, 13 Mar 2010 21:30:12 +0100 Message-ID: <38b2ab8a1003131230q469158b3qd7dcb9f880ea68e1@mail.gmail.com> References: <38b2ab8a1003130056u4b025839i556a797ccad894de@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE To: linux-fsdevel@vger.kernel.org Return-path: Received: from mail-fx0-f227.google.com ([209.85.220.227]:39182 "EHLO mail-fx0-f227.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759164Ab0CMUaP convert rfc822-to-8bit (ORCPT ); Sat, 13 Mar 2010 15:30:15 -0500 Received: by fxm27 with SMTP id 27so2473963fxm.28 for ; Sat, 13 Mar 2010 12:30:12 -0800 (PST) In-Reply-To: <38b2ab8a1003130056u4b025839i556a797ccad894de@mail.gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: [resending to fs-devel mailing list hoping to get some hints] Hello I've some shell scripts which try to find out the filesystem hosted by a block device. They basically do this: =A0 =A0mount /dev/sdc1 /mnt =A0 =A0fs=3D$(stat -f -c %T $mount_point) =A0 =A0umount /mnt It happens to work but since an unknown upgrade (kernel, libs or tools upgrade), umount(8) returns -EBUSY. I found that it's actually the sys_umount() which return -EBUSY. So the question, is this expected or is this a regression ? If it's expected then which operation should I add between the mount(8) and umount(8) to make the mount operation completely finish (inside the kernel) so the next umount won't return -EBUSY ? Oh I'm currently using the kernel shipped with F12: 2.6.32.9-67.fc12.x8= 6_64 Thanks -- =46rancis --=20 =46rancis -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html