lkml.org 
[lkml]   [2013]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 02/11] 9p: fix dentry leak in v9fs_vfs_atomic_open_dotl()
On Mon, Sep 16, 2013 at 02:51:56PM +0200, Miklos Szeredi wrote:
> From: Miklos Szeredi <mszeredi@suse.cz>
>
> commit b6f4bee02f "fs/9p: Fix atomic_open" fixed the O_EXCL behavior, but
> results in a dentry leak if v9fs_vfs_lookup() returns non-NULL.

Frankly, I would prefer to deal with that in fs/namei.c:atomic_open()
instead. I.e. let it call finish_no_open() as it used to do and
turn
if (create_error && dentry->d_inode == NULL) {
error = create_error;
goto out;
}
in fs/namei.c:atomic_open() into
if (!dentry->d_inode) {
if (create_error) {
error = create_error;
goto out;
}
} else if ((open_flag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL)) {
error = -EEXIST;
goto out;
}

rather than try to deal with that crap in each instance of ->atomic_open()...
Objections?


\
 
 \ /
  Last update: 2013-09-16 20:41    [W:0.075 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site