mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: malfet@gw.mipt.sw.ru
To: Andrew Morton <andrewm@uow.edu.au>
Cc: linux-kernel@vger.kernel.org
Subject: Re[2]: Question about ext2
Date: Fri, 13 Jul 2001 13:57:59 +0400	[thread overview]
Message-ID: <20010713135759.A9986@srv.mipt.sw.ru> (raw)
In-Reply-To: <20010713120840.A9431@srv.mipt.sw.ru> <3B4EB493.DC805F45@uow.edu.au>
In-Reply-To: <3B4EB493.DC805F45@uow.edu.au>; from andrewm@uow.edu.au on Fri, Jul 13, 2001 at 06:42:59PM +1000

> It's implicit - rename can only rename files to files, and
> directories to directories.  So the check is made at a higher
> level.  Consequently when we get to ext2_rename, if we find
> that the old inode is a directory, we *know* that the new
> one is a directory as well.
Ok, let's look  at the higher levels
We call vfs_rename (old_dir, old_dentry, new_dir, new_dentry), which
checks, wether old_dentry->d_inode is directory
If so it calls vfs_rename_dir, if not calls vfs_rename_other
In vfs_rename_dir checked if we can delete old_dentry (by means of may_delete), then if new_dentry->d_inode is present, check if we can delete it
But it is not checked, wether new_dentry->d_inode directory or not
I don't find this check in chain started from syscall and ends in ext2_rename
Correct me if I'm wrong.
Thanks in advance,
	Nikita


  reply	other threads:[~2001-07-13  9:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-13  8:08 malfet
2001-07-13  8:42 ` Andrew Morton
2001-07-13  9:57   ` malfet [this message]
2001-07-13 10:23     ` Re[2]: " Alexander Viro
2001-07-13 10:57   ` Alexander Viro
2001-07-13 20:22     ` Kai Henningsen
2001-07-14  5:58       ` Alexander Viro
2001-07-14 11:37         ` Kai Henningsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010713135759.A9986@srv.mipt.sw.ru \
    --to=malfet@gw.mipt.sw.ru \
    --cc=andrewm@uow.edu.au \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®