inode->i_op->rename semantics .

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hello all.

im having problem with the mentioned semantics.

can someone please clarify what am i supposed to do in the rename
function??

this is what i thought ( im dealing only with regular files, no
directories. ) :

if we'll ignore all the directory structure menagement, it comes to this->

        struct inode *new_inode = new_dentry->inode;
       	if (new_inode){
		new_inode->i_nlink--;
       		mark_inode_dirty(new_inode);
       		dput(new_dentry);
	}
	else { /* do nothing... */ }

is this correct? well, i thought it was, but the new_inode is not deleted
by the vfs as i supposed .

i think if someone could clarify where in the vfs code the new_inode and
the old_inode get switched ( if at all, or am i supposed to do it? ) it
will solve my misunderstanding.

anyway, thank u all.



========================================================================
nir.


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux