Make this check self-documenting.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
+static int is_delegation_stateid(stateid_t *stateid)
+{
+ return stateid->si_fileid == 0;
+}
+
/*
* Checks for stateid operations
*/
/*
* Checks for stateid operations
*/
goto out;
status = nfserr_bad_stateid;
goto out;
status = nfserr_bad_stateid;
- if (!stateid->si_fileid) { /* delegation stateid */
+ if (is_delegation_stateid(stateid)) {
dp = find_delegation_stateid(ino, stateid);
if (!dp)
goto out;
dp = find_delegation_stateid(ino, stateid);
if (!dp)
goto out;