Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333150
b: refs/heads/master
c: e5929f3
h: refs/heads/master
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Sep 28, 2012
1 parent fa6bcef commit 85dc2b4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 26 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 173f77e9c5cbddb02eebe17dd9c48d39e5eb86b9
refs/heads/master: e5929f3cff05e84f20c68df235f4768920e2e89e
7 changes: 1 addition & 6 deletions trunk/fs/nfs/pnfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ _pnfs_return_layout(struct inode *ino)

spin_lock(&ino->i_lock);
lo = nfsi->layout;
if (!lo || pnfs_test_layout_returned(lo)) {
if (!lo) {
spin_unlock(&ino->i_lock);
dprintk("NFS: %s no layout to return\n", __func__);
goto out;
Expand All @@ -710,7 +710,6 @@ _pnfs_return_layout(struct inode *ino)
goto out;
}
lo->plh_block_lgets++;
pnfs_mark_layout_returned(lo);
spin_unlock(&ino->i_lock);
pnfs_free_lseg_list(&tmp_list);

Expand All @@ -721,7 +720,6 @@ _pnfs_return_layout(struct inode *ino)
status = -ENOMEM;
pnfs_layout_io_set_failed(lo, IOMODE_RW);
pnfs_layout_io_set_failed(lo, IOMODE_READ);
pnfs_clear_layout_returned(lo);
pnfs_put_layout_hdr(lo);
goto out;
}
Expand Down Expand Up @@ -1111,9 +1109,6 @@ pnfs_update_layout(struct inode *ino,
if (list_empty(&lo->plh_segs))
first = true;

/* Enable LAYOUTRETURNs */
pnfs_clear_layout_returned(lo);

spin_unlock(&ino->i_lock);
if (first) {
/* The lo must be on the clp list if there is any
Expand Down
19 changes: 0 additions & 19 deletions trunk/fs/nfs/pnfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ enum {
NFS_LAYOUT_RW_FAILED, /* get rw layout failed stop trying */
NFS_LAYOUT_BULK_RECALL, /* bulk recall affecting layout */
NFS_LAYOUT_ROC, /* some lseg had roc bit set */
NFS_LAYOUT_RETURNED, /* layout has already been returned */
};

enum layoutdriver_policy_flags {
Expand Down Expand Up @@ -259,24 +258,6 @@ void nfs4_mark_deviceid_unavailable(struct nfs4_deviceid_node *node);
bool nfs4_test_deviceid_unavailable(struct nfs4_deviceid_node *node);
void nfs4_deviceid_purge_client(const struct nfs_client *);

static inline void
pnfs_mark_layout_returned(struct pnfs_layout_hdr *lo)
{
set_bit(NFS_LAYOUT_RETURNED, &lo->plh_flags);
}

static inline void
pnfs_clear_layout_returned(struct pnfs_layout_hdr *lo)
{
clear_bit(NFS_LAYOUT_RETURNED, &lo->plh_flags);
}

static inline bool
pnfs_test_layout_returned(struct pnfs_layout_hdr *lo)
{
return test_bit(NFS_LAYOUT_RETURNED, &lo->plh_flags);
}

static inline struct pnfs_layout_segment *
pnfs_get_lseg(struct pnfs_layout_segment *lseg)
{
Expand Down

0 comments on commit 85dc2b4

Please sign in to comment.