deleg: use SETATTR for OPEN4_CREATE

prevent an OPEN with OPEN4_CREATE from breaking a write delegation by sending a SETATTR instead
moved static function remove_unsupported_attrs() from setattr.c to nfs41_superblock_supported_attrs() in nfs41_superblock.c, now used by both setattr.c and delegation.c

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
Casey Bodley 2011-07-08 10:05:23 -04:00 committed by unknown
parent bc6471d981
commit 83d17fcb69
6 changed files with 69 additions and 30 deletions

View file

@ -247,6 +247,22 @@ out:
return status;
}
void nfs41_superblock_supported_attrs(
IN nfs41_superblock *superblock,
IN OUT bitmap4 *attrs)
{
uint32_t i, count = 0;
AcquireSRWLockShared(&superblock->lock);
for (i = 0; i < 3; i++) {
attrs->arr[i] &= superblock->supported_attrs.arr[i];
if (attrs->arr[i])
count = i+1;
}
attrs->count = min(attrs->count, count);
ReleaseSRWLockShared(&superblock->lock);
}
void nfs41_superblock_space_changed(
IN nfs41_superblock *superblock)
{