Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-7939

ldiskfs_find_entry() returns ERR_PTR() but checked for NULL

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Lustre 2.9.0
    • None
    • 3
    • 9223372036854775807

    Description

      In lustre-release/ldiskfs/namei.c:

      struct buffer_head *__ldiskfs_find_entry(struct inode *dir,
      					const struct qstr *d_name,
      					struct ldiskfs_dir_entry_2 **res_dir,
      					int *inlined, struct htree_lock *lck)
      {
      [...]
      bh = ldiskfs_getblk(NULL, dir, b++, 0, &err);
      if (unlikely(err)) {
      	if (ra_max == 0)
      		return ERR_PTR(err);
      [...]
      
      old.bh = ldiskfs_find_entry(old.dir, &old.dentry->d_name,
      				 &old.de, &old.inlined);
      retval = -ENOENT;
      if (!old.bh || le32_to_cpu(old.de->inode) != old.inode->i_ino)
      	goto end_rename;
      

      Attachments

        Issue Links

          Activity

            People

              dmiter Dmitry Eremin (Inactive)
              dmiter Dmitry Eremin (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: