Merge branches 'acpi-extlog', 'acpi-memhotplug', 'acpi-button', 'acpi-tools' and...
[linux-2.6-microblaze.git] / fs / nfs / nfs4proc.c
index f8946b9..6e95c85 100644 (file)
@@ -3293,8 +3293,10 @@ static int _nfs4_do_setattr(struct inode *inode,
 
        /* Servers should only apply open mode checks for file size changes */
        truncate = (arg->iap->ia_valid & ATTR_SIZE) ? true : false;
-       if (!truncate)
+       if (!truncate) {
+               nfs4_inode_make_writeable(inode);
                goto zero_stateid;
+       }
 
        if (nfs4_copy_delegation_stateid(inode, FMODE_WRITE, &arg->stateid, &delegation_cred)) {
                /* Use that stateid */
@@ -7298,7 +7300,12 @@ int nfs4_lock_delegation_recall(struct file_lock *fl, struct nfs4_state *state,
        err = nfs4_set_lock_state(state, fl);
        if (err != 0)
                return err;
-       err = _nfs4_do_setlk(state, F_SETLK, fl, NFS_LOCK_NEW);
+       do {
+               err = _nfs4_do_setlk(state, F_SETLK, fl, NFS_LOCK_NEW);
+               if (err != -NFS4ERR_DELAY)
+                       break;
+               ssleep(1);
+       } while (err == -NFS4ERR_DELAY);
        return nfs4_handle_delegation_recall_error(server, state, stateid, fl, err);
 }