To find the inode of a lower file that's open but unlinked, we cannot find
it via unionfs_lower_inode as that's NULL; but we can get it properly from
lower_dentry->d_inode.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
err = -EINVAL;
goto out;
}
- lower_inode = unionfs_lower_inode(inode);
+
+ /*
+ * Get the lower inode directly from lower dentry, in case ibstart
+ * is -1 (which happens when the file is open but unlinked.
+ */
+ lower_inode = lower_dentry->d_inode;
/* check if user has permission to change lower inode */
err = inode_change_ok(lower_inode, ia);