[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150513201936.22026b44@gmail.com>
Date: Wed, 13 May 2015 20:19:36 +0200
From: Jordi Pujol Palomer <jordipujolp@...il.com>
To: Miklos Szeredi <miklos@...redi.hu>
Cc: Josh Boyer <jwboyer@...oraproject.org>,
Miklos Szeredi <mszeredi@...e.cz>,
Vincent Batts <vbatts@...il.com>,
David Howells <dhowells@...hat.com>,
linux-unionfs@...r.kernel.org,
"Linux-Kernel@...r. Kernel. Org" <linux-kernel@...r.kernel.org>
Subject: Re: Overalyfs regression in 4.0
Hello,
Tested-by: Jordi Pujol Palomer <jordipujolp@...il.com>
Have compiled the version 4.0.3 adding this patch, it works in a
Live OS,
# rmdir /mnt/
# mkdir -p /mnt
# touch /mnt/file
# rmdir /mnt/
rmdir: failed to remove ‘/mnt/’: Directory not empty
# uname -a
Linux pcjordi 4.0.3-1-haswell-lnet-amd64 #1 SMP PREEMPT Wed May 13 19:38:19 CEST 2015 x86_64 GNU/Linux
#
Thanks,
Jordi Pujol
EL Wed, 13 May 2015 17:11:01 +0200
Miklos Szeredi <miklos@...redi.hu> escrigué:
> ---
> Subject: ovl: don't remove non-empty opaque directory
> From: Miklos Szeredi <mszeredi@...e.cz>
>
> When removing an opaque directory we can't just call rmdir() to check
> for emptyness, because the directory will need to be replaced with a
> whiteout. The replacement is done with RENAME_EXCHANGE, which doesn't
> check emptyness.
>
> Solution is just to check emptyness by reading the directory. In the
> future we could add a new rename flag to check for emptyness even for
> RENAME_EXCHANGE to optimize this case.
>
> Reported-by: Vincent Batts <vbatts@...il.com>
> Signed-off-by: Miklos Szeredi <mszeredi@...e.cz>
> Fixes: 263b4a0fee43 ("ovl: dont replace opaque dir")
> Cc: <stable@...r.kernel.org> # v4.0+
> ---
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists