]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/nfs/nfs4state.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
[linux-2.6-omap-h63xx.git] / fs / nfs / nfs4state.c
index e9662ba81d86be1cff5ebef64ffeb7117814936a..bfb36261cecb2ba6a542690b20ab3a573789d5e1 100644 (file)
@@ -341,8 +341,6 @@ nfs4_state_set_mode_locked(struct nfs4_state *state, mode_t mode)
                else
                        list_move_tail(&state->open_states, &state->owner->so_states);
        }
-       if (mode == 0)
-               list_del_init(&state->inode_states);
        state->state = mode;
 }
 
@@ -415,8 +413,7 @@ void nfs4_put_open_state(struct nfs4_state *state)
        if (!atomic_dec_and_lock(&state->count, &owner->so_lock))
                return;
        spin_lock(&inode->i_lock);
-       if (!list_empty(&state->inode_states))
-               list_del(&state->inode_states);
+       list_del(&state->inode_states);
        list_del(&state->open_states);
        spin_unlock(&inode->i_lock);
        spin_unlock(&owner->so_lock);
@@ -777,7 +774,7 @@ static int nfs4_reclaim_locks(struct nfs4_state_recovery_ops *ops, struct nfs4_s
        for (fl = inode->i_flock; fl != 0; fl = fl->fl_next) {
                if (!(fl->fl_flags & (FL_POSIX|FL_FLOCK)))
                        continue;
-               if (((struct nfs_open_context *)fl->fl_file->private_data)->state != state)
+               if (nfs_file_open_context(fl->fl_file)->state != state)
                        continue;
                status = ops->recover_lock(state, fl);
                if (status >= 0)