Merge tag 'pull-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull misc filesystem updates from Al Viro: "Misc cleanups (the part that hadn't been picked by individual fs trees)" * tag 'pull-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: apparmorfs: don't duplicate kfree_link() orangefs: saner arguments passing in readdir guts ocfs2_find_match(): there's no such thing as NULL or negative ->d_parent reiserfs_add_entry(): get rid of pointless namelen checks __ocfs2_add_entry(), ocfs2_prepare_dir_for_insert(): namelen checks ext4_add_entry(): ->d_name.len is never 0 befs: d_obtain_alias(ERR_PTR(...)) will do the right thing affs: d_obtain_alias(ERR_PTR(...)) will do the right thing /proc/sys: use d_splice_alias() calling conventions to simplify failure exits hostfs: use d_splice_alias() calling conventions to simplify failure exits udf_fiiter_add_entry(): check for zero ->d_name.len is bogus... udf: d_obtain_alias(ERR_PTR(...)) will do the right thing... udf: d_splice_alias() will do the right thing on ERR_PTR() inode nfsd: kill stale comment about simple_fill_super() requirements bfs_add_entry(): get rid of pointless ->d_name.len checks nilfs2: d_obtain_alias(ERR_PTR(...)) will do the right thing... zonefs: d_splice_alias() will do the right thing on ERR_PTR() inode
This commit is contained in:
+1
-10
@@ -125,8 +125,6 @@ static struct dentry *udf_lookup(struct inode *dir, struct dentry *dentry,
|
||||
udf_fiiter_release(&iter);
|
||||
|
||||
inode = udf_iget(dir->i_sb, &loc);
|
||||
if (IS_ERR(inode))
|
||||
return ERR_CAST(inode);
|
||||
}
|
||||
|
||||
return d_splice_alias(inode, dentry);
|
||||
@@ -230,8 +228,6 @@ static int udf_fiiter_add_entry(struct inode *dir, struct dentry *dentry,
|
||||
char name[UDF_NAME_LEN_CS0];
|
||||
|
||||
if (dentry) {
|
||||
if (!dentry->d_name.len)
|
||||
return -EINVAL;
|
||||
namelen = udf_put_filename(dir->i_sb, dentry->d_name.name,
|
||||
dentry->d_name.len,
|
||||
name, UDF_NAME_LEN_CS0);
|
||||
@@ -904,7 +900,6 @@ out_oiter:
|
||||
static struct dentry *udf_get_parent(struct dentry *child)
|
||||
{
|
||||
struct kernel_lb_addr tloc;
|
||||
struct inode *inode = NULL;
|
||||
struct udf_fileident_iter iter;
|
||||
int err;
|
||||
|
||||
@@ -914,11 +909,7 @@ static struct dentry *udf_get_parent(struct dentry *child)
|
||||
|
||||
tloc = lelb_to_cpu(iter.fi.icb.extLocation);
|
||||
udf_fiiter_release(&iter);
|
||||
inode = udf_iget(child->d_sb, &tloc);
|
||||
if (IS_ERR(inode))
|
||||
return ERR_CAST(inode);
|
||||
|
||||
return d_obtain_alias(inode);
|
||||
return d_obtain_alias(udf_iget(child->d_sb, &tloc));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user