Re: [PATCH]: Return better error code from vfs_unlink if operation is not defined.

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

 



On Fri, Jan 16, 2009 at 11:13:04AM +0530, Manish Katiyar wrote:
> If the unlink function is not defined by filesystem, then I think it
> is better to return operation not supported rather than saying
> permission denied, which can come from lot other places and keep user
> guessing what went wrong. I came across this while testing one of my
> small modules.

-EOPNOTSUPP is not a valid return value from unlink().  It's also
documented in the manpage:

       EPERM (Linux only)
              The file system does not allow unlinking of files.

In general, you should never use -EOPNOTSUPP.  It's only for use by
networking STREAMS.

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux