2.0.0rc7 can not remove symbol-links

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

 



2009/3/26 Kirby Zhou <kirbyzhou at sohu-rd.com>:
> My patch:
>
> ##############
> --- glusterfs-2.0.0rc7.ori/xlators/storage/posix/src/posix.c ? ?2009-03-26
> 18:50:11.000000000 +0800
> +++ glusterfs-2.0.0rc7/xlators/storage/posix/src/posix.c ? ? ? ?2009-03-26
> 18:50:19.000000000 +0800
> @@ -866,11 +866,8 @@
>
> ? ? ? ? fd = open (real_path, O_RDONLY);
> ? ? ? ? if (fd == -1) {
> - ? ? ? ? ? ? ? ?op_ret = -1;
> - ? ? ? ? ? ? ? ?op_errno = errno;
> ? ? ? ? ? ? ? ? gf_log (this->name, GF_LOG_WARNING,
> ? ? ? ? ? ? ? ? ? ? ? ? "open of %s failed: %s", loc->path, strerror
> (op_errno));
> - ? ? ? ? ? ? ? ?goto out;
> ? ? ? ? }
>
> ? ? ? ? op_ret = unlink (real_path);

It'd be better to simply not do the open() on any file other than
regular files. The fix is on its way to being committed. Thanks for
spotting this, and sending the patch :)

Vikas
-- 
Engineer - Z Research
http://gluster.com/



[Index of Archives]     [Gluster Development]     [Linux Filesytems Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux