b=12784
i=green
i=adilger
Original patch by miles@cray.com
Description: bad return value and errno from fcntl call
Details : In liblustre API, errno should be a negative value if error
happens.
Details : nothing special is done in obdo_alloc() function, and for
debugging purpose, it needs to be replaced with macros.
+Severity : normal
+Bugzilla : 12784
+Description: bad return value and errno from fcntl call
+Details : In liblustre API, errno should be a negative value if error
+ happens.
+
--------------------------------------------------------------------------------
2007-05-03 Cluster File Systems, Inc. <info@clusterfs.com>
struct file_lock fl;
int error;
- error = EINVAL;
+ error = -EINVAL;
if ((flock->l_type != F_RDLCK) && (flock->l_type != F_WRLCK))
goto out;
LCONSOLE_ERROR_MSG(0x010, "liblustre does not support "
"the O_NONBLOCK or O_ASYNC flags. "
"Please fix your application.\n");
- *rtn = -EINVAL;
- err = EINVAL;
+ *rtn = -1;
+ err = -EINVAL;
break;
}
lli->lli_open_flags = (int)(flags & FCNTL_FLMASK) |
break;
default:
CERROR("unsupported fcntl cmd %x\n", cmd);
- *rtn = -ENOSYS;
- err = ENOSYS;
+ *rtn = -1;
+ err = -ENOSYS;
break;
}