Re: Possible Solaris problem in 'checkout_entry()'

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

 




On Mon, 17 Mar 2008, Morten Welinder wrote:
>
> >                 unlink(path);
> 
> And checking the result from unlink might not hurt either.

Well, that part is actually intentional. We simply don't care. If the 
unlink succeeds, we're happy, if it fails, we're happy. No reason to test, 
really.

(Well, it's not that we're "happy" if the unlink fails, but we actually 
_expect_ it to fail for directories, and regardless of that we're really 
doing the _real_ error handling later when we actually create the new 
entry that will replace the old one, so we don't much care at unlink 
time).

IOW, the real "checking" is taking place in "create_file()", so if the 
unlinking failed (due to a read-only directory or something), that's where 
we'll do the proper error reporting.

		Linus
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux