diff options
| author | Mike Marshall <hubcap@omnibond.com> | 2015-09-24 19:53:05 +0300 |
|---|---|---|
| committer | Mike Marshall <hubcap@omnibond.com> | 2015-10-03 18:44:34 +0300 |
| commit | f957ae2dec09b63b44df9ec06765cbdc52666eec (patch) | |
| tree | ba94f01577e733b3a380315bfea680e142c3680e | |
| parent | d6fe654b7b580720fee632c8d526c6a159111d50 (diff) | |
| download | linux-f957ae2dec09b63b44df9ec06765cbdc52666eec.tar.xz | |
Orangefs: choose return codes from among the expected ones.
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
| -rw-r--r-- | fs/orangefs/file.c | 2 | ||||
| -rw-r--r-- | fs/orangefs/namei.c | 12 |
2 files changed, 5 insertions, 9 deletions
diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c index 3e5fc1a2c82f..53e58c3f2121 100644 --- a/fs/orangefs/file.c +++ b/fs/orangefs/file.c @@ -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) { - int rc = -ENOLCK; + int rc = -EINVAL; if (PVFS2_SB(filp->f_inode->i_sb)->flags & PVFS2_OPT_LOCAL_LOCK) { if (cmd == F_GETLK) { diff --git a/fs/orangefs/namei.c b/fs/orangefs/namei.c index 747fe6a690af..05f6feadfd0d 100644 --- a/fs/orangefs/namei.c +++ b/fs/orangefs/namei.c @@ -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 - * reasonable error code (the kernel will return a misleading EPERM - * otherwise). PVFS2 does not support hard links. + * PVFS2 does not support hard links. */ static int pvfs2_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry) { - return -EOPNOTSUPP; + return -EPERM; } /* - * pvfs2_mknod() is only implemented here to make sure that we return a - * reasonable error code (the kernel will return a misleading EPERM - * otherwise). PVFS2 does not support special files such as fifos or devices. + * PVFS2 does not support special files. */ static int pvfs2_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t rdev) { - return -EOPNOTSUPP; + return -EPERM; } static int pvfs2_symlink(struct inode *dir, |
