cramfs_lookup(): use d_splice_alias()
Subsystems (2)
RFC PATCH 1/1 cramfs_lookup(): use d_splice_alias()
simpler code that way, actually
Signed-off-by Al Viro <[email protected]>
--- fs/cramfs/inode.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
fs/cramfs/inode.c +1 -4
@@ -808,10 +808,7 @@ static struct dentry *cramfs_lookup(struct inode *dir, struct dentry *dentry, un } out:mutex_unlock (&read_mutex); -if (IS_ERR (inode)) -return ERR_CAST (inode); -d_add (dentry, inode); -return NULL ; +return d_splice_alias (inode, dentry); }static int cramfs_readpage (struct file *file,struct page *page)
Signature · 1 line
2.11.0
Quoted 4 lines · Al Viro
simpler code that way, actually
Signed-off-by Al Viro <[email protected]>
Agreed.
Acked-by Nicolas Pitre <[email protected]>
Please feel free to carry this patch in your repo as you see fit. Mine is empty wrt cramfs at the moment and generating a pull req to Linus to bounce only one patch from you would be silly.
Quoted 25 lines
--- fs/cramfs/inode.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)fs/cramfs/inode.c +1
-4@@ -808,10 +808,7 @@ static struct dentry *cramfs_lookup(struct inode *dir, struct dentry *dentry, un } out:mutex_unlock (&read_mutex); -if (IS_ERR (inode)) -return ERR_CAST (inode); -d_add (dentry, inode); -return NULL ; +return d_splice_alias (inode, dentry); }static int cramfs_readpage (struct file *file,struct page *page)Signature · 1 line
2.11.0
Al Viro
maintainerQuoted 7 lines · Nicolas Pitre
Quoted 4 lines · Al Viro
simpler code that way, actually
Signed-off-by Al Viro <[email protected]>
Quoted 7 lines
Agreed.
Acked-by Nicolas Pitre <[email protected]>Please feel free to carry this patch in your repo as you see fit. Mine is empty wrt cramfs at the moment and generating a pull req to Linus to bounce only one patch from you would be silly.
Sure; apologies for duplicate you'll get - I should've used git-send-email to start with ;-/