lkml.org 
[lkml]   [2006]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 04/22][RFC] Unionfs: Common file operations
On Fri, Sep 01, 2006 at 06:20:00PM -0400, Trond Myklebust wrote:
> On Thu, 2006-08-31 at 21:41 -0400, Josef Sipek wrote:
...
> > + for (bindex = bstart; bindex <= bend; bindex++) {
> > + hidden_dentry = dtohd_index(file->f_dentry, bindex);
> > + if (!hidden_dentry)
> > + continue;
> > +
> > + dget(hidden_dentry);
> > + mntget(stohiddenmnt_index(inode->i_sb, bindex));
> > + hidden_file = dentry_open(hidden_dentry,
> > + stohiddenmnt_index(inode->i_sb, bindex),
> > + file->f_flags);
>
> Race! You cannot open an underlying NFS file by name after it has been
> looked up: you have no guarantee that it hasn't been renamed.

From what I can see, the solution to this would be to pass the lookup
intents in unionfs_lookup down to the lower filesystem (the way it should be
done in the first place). Then, we could use the dentry here without any
problems. Is that all that needs to be done or am I forgetting something?

Thanks,

Josef "Jeff" Sipek.

--
VGER BF report: H 0
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-09-02 04:51    [W:0.122 / U:72.728 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site