]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Orangefs: choose return codes from among the expected ones.
authorMike Marshall <hubcap@omnibond.com>
Thu, 24 Sep 2015 16:53:05 +0000 (12:53 -0400)
committerMike Marshall <hubcap@omnibond.com>
Sat, 3 Oct 2015 15:44:34 +0000 (11:44 -0400)
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
fs/orangefs/file.c
fs/orangefs/namei.c

index 3e5fc1a2c82f3fa63843ddd365fc6bb0d89938d4..53e58c3f212192761c8cdb305ec78aadd6f30235 100644 (file)
@@ -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) {
index 747fe6a690af9c4f2b6abb95b09c278a8154b93c..05f6feadfd0d37a714afe5783c542ed112cc362f 100644 (file)
@@ -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,