Thread (11 messages) 11 messages, 4 authors, 2012-06-12

Re: [PATCH 5/4] exofs: Handle error from d_splice_alias()

From: Al Viro <viro@ZenIV.linux.org.uk>
Date: 2012-06-08 21:59:57
Also in: linux-fsdevel

On Wed, May 30, 2012 at 01:39:08PM +0300, Boaz Harrosh wrote:
+	ret = d_splice_alias(inode, dentry);
+	if (IS_ERR(ret)) {
+		EXOFS_ERR("directory #%lu corrupted", dir->i_ino);
+		iput(inode);
That's a bloody wrong interface.  If you add d_splice_alias() failure
exit like that, do iput() *there*.  Requiring every caller to deal with
failure exit cleanups like that is the recipe for recurring bugs.
Don't Do That.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help