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
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.