lkml.org 
[lkml]   [2017]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] vfs: introduce UMOUNT_WAIT which waits for umount completion
On Wed, Sep 13, 2017 at 04:31:16PM -0700, Jaegeuk Kim wrote:
> Hi Al,
>
> On 09/14, Al Viro wrote:
> > On Wed, Sep 13, 2017 at 01:09:41PM -0700, Jaegeuk Kim wrote:
> > > + if (!retval && (flags & UMOUNT_WAIT)) {
> > > + if (likely(!(current->flags & PF_KTHREAD)))
> > > + task_work_run();
> >
> > This is complete crap. The same damn thing will be done by
> > caller of sys_umount() pretty much immediately afterwards.
> > I'm not sure what it is that you are trying to paper over,
> > but this is just plain wrong.
>
> Okay.
>
> > What _is_ the semantics of UMOUNT_WAIT? What does it guarantee,
> > and what would be supplying it to umount(2)?
>
> When android tries to reboot the system, it calls umount(2) without any flag.
> Then, mntput_no_expire() will add delayed_mntput_work() which finally does
> cleanup_mnt() later. In the mean time, android proceeded to shutdown all
> the UFS devices.

Why has task_work_add() failed? Or is that umount(2) issued by a kernel thread?

\
 
 \ /
  Last update: 2017-09-14 01:44    [W:0.079 / U:2.760 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site