cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH] GFS2: Hash the negative dentry during inode lookup
@ 2014-09-10 18:09 Benjamin Coddington
  2014-09-11 12:42 ` Steven Whitehouse
  0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Coddington @ 2014-09-10 18:09 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Fix a regression introduced by:
6d4ade986f9c8df31e68 GFS2: Add atomic_open support
where an early return misses d_splice_alias() which had been
adding the negative dentry.

Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
---
 fs/gfs2/inode.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index e62e594..9317ddc 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -840,8 +840,10 @@ static struct dentry *__gfs2_lookup(struct inode *dir, struct dentry *dentry,
 	int error;
 
 	inode = gfs2_lookupi(dir, &dentry->d_name, 0);
-	if (!inode)
+	if (inode == NULL) {
+		d_add(dentry, NULL);
 		return NULL;
+	}
 	if (IS_ERR(inode))
 		return ERR_CAST(inode);
 
-- 
1.7.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Cluster-devel] [PATCH] GFS2: Hash the negative dentry during inode lookup
  2014-09-10 18:09 [Cluster-devel] [PATCH] GFS2: Hash the negative dentry during inode lookup Benjamin Coddington
@ 2014-09-11 12:42 ` Steven Whitehouse
  0 siblings, 0 replies; 2+ messages in thread
From: Steven Whitehouse @ 2014-09-11 12:42 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Hi,

On 10/09/14 19:09, Benjamin Coddington wrote:
> Fix a regression introduced by:
> 6d4ade986f9c8df31e68 GFS2: Add atomic_open support
> where an early return misses d_splice_alias() which had been
> adding the negative dentry.
>
> Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
> ---
>   fs/gfs2/inode.c |    4 +++-
>   1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
> index e62e594..9317ddc 100644
> --- a/fs/gfs2/inode.c
> +++ b/fs/gfs2/inode.c
> @@ -840,8 +840,10 @@ static struct dentry *__gfs2_lookup(struct inode *dir, struct dentry *dentry,
>   	int error;
>   
>   	inode = gfs2_lookupi(dir, &dentry->d_name, 0);
> -	if (!inode)
> +	if (inode == NULL) {
> +		d_add(dentry, NULL);
>   		return NULL;
> +	}
>   	if (IS_ERR(inode))
>   		return ERR_CAST(inode);
>   

Now in the GFS2 -nmw tree, and I've added Bob's signed-off-by too. Thanks,

Steve.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-11 12:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-10 18:09 [Cluster-devel] [PATCH] GFS2: Hash the negative dentry during inode lookup Benjamin Coddington
2014-09-11 12:42 ` Steven Whitehouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).