fs: remove the unused SB_I_MULTIROOT flag
[linux-2.6-microblaze.git] / fs / namei.c
index 2112e57..f1eb8cc 100644 (file)
@@ -568,8 +568,8 @@ static bool path_connected(struct vfsmount *mnt, struct dentry *dentry)
 {
        struct super_block *sb = mnt->mnt_sb;
 
-       /* Bind mounts and multi-root filesystems can have disconnected paths */
-       if (!(sb->s_iflags & SB_I_MULTIROOT) && (mnt->mnt_root == sb->s_root))
+       /* Bind mounts can have disconnected paths */
+       if (mnt->mnt_root == sb->s_root)
                return true;
 
        return is_subdir(dentry, mnt->mnt_root);
@@ -2849,8 +2849,10 @@ static int may_open(const struct path *path, int acc_mode, int flag)
        case S_IFLNK:
                return -ELOOP;
        case S_IFDIR:
-               if (acc_mode & (MAY_WRITE | MAY_EXEC))
+               if (acc_mode & MAY_WRITE)
                        return -EISDIR;
+               if (acc_mode & MAY_EXEC)
+                       return -EACCES;
                break;
        case S_IFBLK:
        case S_IFCHR: