Whamcloud - gitweb
b=3643
authorgreen <green>
Thu, 17 Jun 2004 16:40:56 +0000 (16:40 +0000)
committergreen <green>
Thu, 17 Jun 2004 16:40:56 +0000 (16:40 +0000)
Only try to look for GNS mount objects inside of directories.

lustre/llite/dcache.c
lustre/llite/llite_gns.c
lustre/llite/namei.c

index 436dea9..a338e40 100644 (file)
@@ -330,7 +330,7 @@ int ll_revalidate_it(struct dentry *de, int flags, struct nameidata *nd,
                atomic_read(&de->d_count));
         ll_lookup_finish_locks(it, de);
         de->d_flags &= ~DCACHE_LUSTRE_INVALID;
                atomic_read(&de->d_count));
         ll_lookup_finish_locks(it, de);
         de->d_flags &= ~DCACHE_LUSTRE_INVALID;
-        if (!(de->d_inode->i_mode & S_ISUID) ||
+        if (!((de->d_inode->i_mode & S_ISUID) &&S_ISDIR(de->d_inode->i_mode)) ||
             !(flags & LOOKUP_CONTINUE || (it->it_op & (IT_CHDIR | IT_OPEN))))
                 return rc;
 
             !(flags & LOOKUP_CONTINUE || (it->it_op & (IT_CHDIR | IT_OPEN))))
                 return rc;
 
index 38cdc53..bea1161 100644 (file)
@@ -109,6 +109,7 @@ int ll_dir_process_mount_object(struct dentry *dentry, struct vfsmount *mnt)
         }
 
         LASSERT(dentry->d_inode != NULL);
         }
 
         LASSERT(dentry->d_inode != NULL);
+        LASSERT(S_ISDIR(dentry->d_inode->i_mode));
         LASSERT(lld != NULL);
         sbi = ll_i2sbi(dentry->d_inode);
         LASSERT(sbi != NULL);
         LASSERT(lld != NULL);
         sbi = ll_i2sbi(dentry->d_inode);
         LASSERT(sbi != NULL);
index 85f950e..61cf15b 100644 (file)
@@ -378,6 +378,7 @@ static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry,
 
         if (nd &&
             dentry->d_inode != NULL && dentry->d_inode->i_mode & S_ISUID &&
 
         if (nd &&
             dentry->d_inode != NULL && dentry->d_inode->i_mode & S_ISUID &&
+            S_ISDIR(dentry->d_inode->i_mode) &&
             (flags & LOOKUP_CONTINUE || (it->it_op & (IT_CHDIR | IT_OPEN))))
                 ll_dir_process_mount_object(dentry, nd->mnt);
 
             (flags & LOOKUP_CONTINUE || (it->it_op & (IT_CHDIR | IT_OPEN))))
                 ll_dir_process_mount_object(dentry, nd->mnt);