[Cbe-oss-dev] [PATCH] spufs: spu_create should send inotify IM_CREATE event

Christoph Hellwig hch at lst.de
Thu Mar 20 18:38:24 EST 2008


On Wed, Mar 19, 2008 at 08:05:27AM +0100, Christoph Hellwig wrote:
> Ok, destruction is a more complicated as the notification is handled
> by d_delete which spufs should but doesn't call currently.  The fix
> seems easy and the patch below gives me the inotify delete notifcation
> and passes Jeremy's testsuite without regression.

Can I please get someone to review this?

> 
> 
> Signed-off-by: Christoph Hellwig <hch at lst.de>
> 
> Index: linux-2.6/arch/powerpc/platforms/cell/spufs/inode.c
> ===================================================================
> --- linux-2.6.orig/arch/powerpc/platforms/cell/spufs/inode.c	2008-03-19 07:34:43.000000000 +0100
> +++ linux-2.6/arch/powerpc/platforms/cell/spufs/inode.c	2008-03-19 07:49:41.000000000 +0100
> @@ -172,7 +172,6 @@ static int spufs_rmdir(struct inode *par
>  {
>  	/* remove all entries */
>  	spufs_prune_dir(dir);
> -	d_drop(dir);
>  
>  	return simple_rmdir(parent, dir);
>  }
> @@ -227,6 +226,9 @@ static int spufs_dir_close(struct inode 
>  	mutex_lock(&parent->i_mutex);
>  	ret = spufs_rmdir(parent, dir);
>  	mutex_unlock(&parent->i_mutex);
> +
> +	if (!ret)
> +		d_delete(dir);
>  	WARN_ON(ret);
>  
>  	/* We have to give up the mm_struct */
> @@ -478,8 +480,13 @@ spufs_create_context(struct inode *inode
>  	 */
>  	ret = spufs_context_open(dget(dentry), mntget(mnt));
>  	if (ret < 0) {
> -		WARN_ON(spufs_rmdir(inode, dentry));
> +		int ret;
> +
> +		ret = spufs_rmdir(inode, dentry);
>  		mutex_unlock(&inode->i_mutex);
> +		if (!ret)
> +			d_delete(dentry);
> +		WARN_ON(ret);
>  		spu_forget(SPUFS_I(dentry->d_inode)->i_ctx);
>  		goto out;
>  	}
> _______________________________________________
> cbe-oss-dev mailing list
> cbe-oss-dev at ozlabs.org
> https://ozlabs.org/mailman/listinfo/cbe-oss-dev
---end quoted text---



More information about the cbe-oss-dev mailing list