bug-hurd
[Top][All Lists]
Advanced

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

Bug#190732: [PATCH] hurd/libdiskfs/dir-renamed.c


From: Alfred M. Szmidt
Subject: Bug#190732: [PATCH] hurd/libdiskfs/dir-renamed.c
Date: Tue, 2 Mar 2004 17:03:44 +0100 (MET)

   2003-07-29  Ognyan Kulev  <ogi@fmi.uni-sofia.bg>

           * dir-renamed.c (checkpath): Redundant assignment is removed.
           (diskfs_rename_dir): Remove variable BUF.
           Space for DS is allocated with alloca.
           When renaming node to itself, goto out instead of repeating code.
           When checking if TNP is empty directory, assertion "!err" is
           checked.
           When maximum link count of TDP is reached, goto out instead of
           returning immediately.
           When maximum link count of FNP is reached, goto out instead of
           repeating code.
           diskfs_node_update FNP only if diskfs_synchronous.
           After entering entry TONAME to TDP, set DS to 0.
           When preparing to remove FROMNAME from FDP, use TMPDS instead of
           DS.  Fix the assertion so that it can handle errors.  If error
           occur, diskfs_drop_dirstat TMPDS before goto out.

           * dir-rename.c (diskfs_S_dir_rename): Now really serialize
           directory renaming with RENAMEDIRLOCK.
           When renaming directory, don't diskfs_node_update and
           diskfs_file_update because dir-renamed.c::diskfs_rename_dir
           already do it.
           When TONAME is .. of filesystem's root, not only set ERR to
           EINVAL, but return this error.
           When EXCL is set and target exist, unlock things properly.
           When FROMNAME is regular file and TONAME is directory, unlock TNP
           before returning.
           When maximum link count of FNP is reached and TNP is not NULL,
           unlock TNP before returning.
           When updating FNP after incrementing its link count, call
           diskfs_node_update only if diskfs_synchronous.
           After TONAME enters TDP, call diskfs_file_update instead of
           diskfs_node_update.

What bug did this patch fix exactly?  Do you have any test cases for
this?

And for the future, please please please refrain from obfuscuating the
patch with cosmetic changes (like removing redundat variables and what
not).  It makes it so much harder to read and follow.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]