lkml.org 
[lkml]   [2009]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] vfs: new O_NODE open flag
Andreas Dilger wrote:
> > It's not possible even without this flag. Consider:
> >
> > fd1 = open("/tmp/foo",flags);
> > rc = rename("/tmp/foo","/tmp/bar");
> > fd2 = open("/tmp/foo",flags);
> >
> > Or were you asking if *absent that sort of tomfoolery* if it would work?
>
> No, the point is that we HAVE an fd that points to the original "/tmp/foo"
> opened with O_NODE, and now (after an ioctl, stat, etc) we decide it is
> safe to open the file read and/or write without releasing the existing
> fd. The whole point is to AVOID this kind of tomfoolery.

Make sense, and openat() seems like a good way to accomplish it.

-- Jamie


\
 
 \ /
  Last update: 2009-09-28 17:57    [W:0.413 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site