Re: [BUGFIX][PATCH 3/3] configfs: Fix failing symlink() making rmdir() fail

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Joel Becker
Date: Thursday, June 19, 2008 - 3:16 pm

On Tue, Jun 17, 2008 at 07:37:23PM +0200, Louis Rilling wrote:

	Ok, I can see some of why I hated this.


	Use parenthesis.  Actually, separate out the error cases.


	This open-code of the VFS munging is ripe to break when the VFS
changes or other configfs changes happen.  The real issue is that you
are reimplementing the core of configfs_unlink().  Note how the core VFS
munging of configfs_rmdir() is separated out so that configfs_mkdir()
can also use it in the failure case?  Do the same with unlink() and it
will read much better ("if (DROPPING) configfs_delete_link()").  Call it
configfs_remove_link() or configfs_delete_link().

Joel

-- 

Life's Little Instruction Book #337

	"Reread your favorite book."

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[BUGFIX][PATCH 0/3] configfs: symlink() fixes, Louis Rilling, (Tue Jun 17, 10:37 am)
Re: [BUGFIX][PATCH 3/3] configfs: Fix failing symlink() ma ..., Joel Becker, (Thu Jun 19, 3:16 pm)