Skip to content

Commit dc0b027

Browse files
Trond MyklebustTrond Myklebust
Trond Myklebust
authored and
Trond Myklebust
committed
NFSv4: Convert the open and close ops to use fmode
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
1 parent 7a50c60 commit dc0b027

File tree

7 files changed

+94
-83
lines changed

7 files changed

+94
-83
lines changed

Diff for: fs/nfs/inode.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ static void nfs_file_set_open_context(struct file *filp, struct nfs_open_context
592592
/*
593593
* Given an inode, search for an open context with the desired characteristics
594594
*/
595-
struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, int mode)
595+
struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, fmode_t mode)
596596
{
597597
struct nfs_inode *nfsi = NFS_I(inode);
598598
struct nfs_open_context *pos, *ctx = NULL;

Diff for: fs/nfs/nfs4_fs.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ struct nfs4_state {
161161
unsigned int n_rdonly; /* Number of read-only references */
162162
unsigned int n_wronly; /* Number of write-only references */
163163
unsigned int n_rdwr; /* Number of read/write references */
164-
int state; /* State on the server (R,W, or RW) */
164+
fmode_t state; /* State on the server (R,W, or RW) */
165165
atomic_t count;
166166
};
167167

@@ -223,9 +223,9 @@ extern struct nfs4_state_owner * nfs4_get_state_owner(struct nfs_server *, struc
223223
extern void nfs4_put_state_owner(struct nfs4_state_owner *);
224224
extern struct nfs4_state * nfs4_get_open_state(struct inode *, struct nfs4_state_owner *);
225225
extern void nfs4_put_open_state(struct nfs4_state *);
226-
extern void nfs4_close_state(struct path *, struct nfs4_state *, mode_t);
227-
extern void nfs4_close_sync(struct path *, struct nfs4_state *, mode_t);
228-
extern void nfs4_state_set_mode_locked(struct nfs4_state *, mode_t);
226+
extern void nfs4_close_state(struct path *, struct nfs4_state *, fmode_t);
227+
extern void nfs4_close_sync(struct path *, struct nfs4_state *, fmode_t);
228+
extern void nfs4_state_set_mode_locked(struct nfs4_state *, fmode_t);
229229
extern void nfs4_schedule_state_recovery(struct nfs_client *);
230230
extern void nfs4_schedule_state_manager(struct nfs_client *);
231231
extern int nfs4_state_mark_reclaim_nograce(struct nfs_client *clp, struct nfs4_state *state);

0 commit comments

Comments
 (0)