erofs: clean up unnecessary code and comments
[linux-2.6-microblaze.git] / fs / erofs / namei.c
index fd75506..afbb80d 100644 (file)
@@ -185,7 +185,6 @@ int erofs_namei(struct inode *dir, const struct qstr *name, erofs_nid_t *nid,
        if (IS_ERR(de))
                return PTR_ERR(de);
 
-       /* the target page has been mapped */
        if (ndirents)
                de = find_target_dirent(&qn, (u8 *)de, EROFS_BLKSIZ, ndirents);
 
@@ -197,9 +196,7 @@ int erofs_namei(struct inode *dir, const struct qstr *name, erofs_nid_t *nid,
        return PTR_ERR_OR_ZERO(de);
 }
 
-/* NOTE: i_mutex is already held by vfs */
-static struct dentry *erofs_lookup(struct inode *dir,
-                                  struct dentry *dentry,
+static struct dentry *erofs_lookup(struct inode *dir, struct dentry *dentry,
                                   unsigned int flags)
 {
        int err;
@@ -207,17 +204,11 @@ static struct dentry *erofs_lookup(struct inode *dir,
        unsigned int d_type;
        struct inode *inode;
 
-       DBG_BUGON(!d_really_is_negative(dentry));
-       /* dentry must be unhashed in lookup, no need to worry about */
-       DBG_BUGON(!d_unhashed(dentry));
-
        trace_erofs_lookup(dir, dentry, flags);
 
-       /* file name exceeds fs limit */
        if (dentry->d_name.len > EROFS_NAME_LEN)
                return ERR_PTR(-ENAMETOOLONG);
 
-       /* false uninitialized warnings on gcc 4.8.x */
        err = erofs_namei(dir, &dentry->d_name, &nid, &d_type);
 
        if (err == -ENOENT) {