aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/dcache.c')
-rw-r--r--fs/dcache.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index 46fc78206782..d45ff7f5ecc2 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1187,17 +1187,17 @@ struct dentry * d_alloc_anon(struct inode *inode)
1187 * allocating a new one. 1187 * allocating a new one.
1188 * 1188 *
1189 * On successful return, the reference to the inode has been transferred 1189 * On successful return, the reference to the inode has been transferred
1190 * to the dentry. If %NULL is returned (indicating kmalloc failure), 1190 * to the dentry. In case of an error the reference on the inode is released.
1191 * the reference on the inode has been released. To make it easier 1191 * To make it easier to use in export operations a %NULL or IS_ERR inode may
1192 * to use in export operations a NULL or IS_ERR inode may be passed in 1192 * be passed in and will be the error will be propagate to the return value,
1193 * and will be casted to the corresponding NULL or IS_ERR dentry. 1193 * with a %NULL @inode replaced by ERR_PTR(-ESTALE).
1194 */ 1194 */
1195struct dentry *d_obtain_alias(struct inode *inode) 1195struct dentry *d_obtain_alias(struct inode *inode)
1196{ 1196{
1197 struct dentry *dentry; 1197 struct dentry *dentry;
1198 1198
1199 if (!inode) 1199 if (!inode)
1200 return NULL; 1200 return ERR_PTR(-ESTALE);
1201 if (IS_ERR(inode)) 1201 if (IS_ERR(inode))
1202 return ERR_CAST(inode); 1202 return ERR_CAST(inode);
1203 1203