Orangefs: choose return codes from among the expected ones.
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
This commit is contained in:
parent
d6fe654b7b
commit
f957ae2dec
2 changed files with 5 additions and 9 deletions
|
@ -973,7 +973,7 @@ static loff_t pvfs2_file_llseek(struct file *file, loff_t offset, int origin)
|
||||||
*/
|
*/
|
||||||
static int pvfs2_lock(struct file *filp, int cmd, struct file_lock *fl)
|
static int pvfs2_lock(struct file *filp, int cmd, struct file_lock *fl)
|
||||||
{
|
{
|
||||||
int rc = -ENOLCK;
|
int rc = -EINVAL;
|
||||||
|
|
||||||
if (PVFS2_SB(filp->f_inode->i_sb)->flags & PVFS2_OPT_LOCAL_LOCK) {
|
if (PVFS2_SB(filp->f_inode->i_sb)->flags & PVFS2_OPT_LOCAL_LOCK) {
|
||||||
if (cmd == F_GETLK) {
|
if (cmd == F_GETLK) {
|
||||||
|
|
|
@ -243,28 +243,24 @@ static int pvfs2_unlink(struct inode *dir, struct dentry *dentry)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* pvfs2_link() is only implemented here to make sure that we return a
|
* PVFS2 does not support hard links.
|
||||||
* reasonable error code (the kernel will return a misleading EPERM
|
|
||||||
* otherwise). PVFS2 does not support hard links.
|
|
||||||
*/
|
*/
|
||||||
static int pvfs2_link(struct dentry *old_dentry,
|
static int pvfs2_link(struct dentry *old_dentry,
|
||||||
struct inode *dir,
|
struct inode *dir,
|
||||||
struct dentry *dentry)
|
struct dentry *dentry)
|
||||||
{
|
{
|
||||||
return -EOPNOTSUPP;
|
return -EPERM;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* pvfs2_mknod() is only implemented here to make sure that we return a
|
* PVFS2 does not support special files.
|
||||||
* reasonable error code (the kernel will return a misleading EPERM
|
|
||||||
* otherwise). PVFS2 does not support special files such as fifos or devices.
|
|
||||||
*/
|
*/
|
||||||
static int pvfs2_mknod(struct inode *dir,
|
static int pvfs2_mknod(struct inode *dir,
|
||||||
struct dentry *dentry,
|
struct dentry *dentry,
|
||||||
umode_t mode,
|
umode_t mode,
|
||||||
dev_t rdev)
|
dev_t rdev)
|
||||||
{
|
{
|
||||||
return -EOPNOTSUPP;
|
return -EPERM;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int pvfs2_symlink(struct inode *dir,
|
static int pvfs2_symlink(struct inode *dir,
|
||||||
|
|
Loading…
Reference in a new issue