Skip to content

Commit f957ae2

Browse files
committed
Orangefs: choose return codes from among the expected ones.
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
1 parent d6fe654 commit f957ae2

2 files changed

Lines changed: 5 additions & 9 deletions

File tree

‎fs/orangefs/file.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -973,7 +973,7 @@ static loff_t pvfs2_file_llseek(struct file *file, loff_t offset, int origin)
973973
*/
974974
static int pvfs2_lock(struct file *filp, int cmd, struct file_lock *fl)
975975
{
976-
int rc = -ENOLCK;
976+
int rc = -EINVAL;
977977

978978
if (PVFS2_SB(filp->f_inode->i_sb)->flags & PVFS2_OPT_LOCAL_LOCK) {
979979
if (cmd == F_GETLK) {

‎fs/orangefs/namei.c‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -243,28 +243,24 @@ static int pvfs2_unlink(struct inode *dir, struct dentry *dentry)
243243
}
244244

245245
/*
246-
* pvfs2_link() is only implemented here to make sure that we return a
247-
* reasonable error code (the kernel will return a misleading EPERM
248-
* otherwise). PVFS2 does not support hard links.
246+
* PVFS2 does not support hard links.
249247
*/
250248
static int pvfs2_link(struct dentry *old_dentry,
251249
struct inode *dir,
252250
struct dentry *dentry)
253251
{
254-
return -EOPNOTSUPP;
252+
return -EPERM;
255253
}
256254

257255
/*
258-
* pvfs2_mknod() is only implemented here to make sure that we return a
259-
* reasonable error code (the kernel will return a misleading EPERM
260-
* otherwise). PVFS2 does not support special files such as fifos or devices.
256+
* PVFS2 does not support special files.
261257
*/
262258
static int pvfs2_mknod(struct inode *dir,
263259
struct dentry *dentry,
264260
umode_t mode,
265261
dev_t rdev)
266262
{
267-
return -EOPNOTSUPP;
263+
return -EPERM;
268264
}
269265

270266
static int pvfs2_symlink(struct inode *dir,

0 commit comments

Comments
 (0)