diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2006-10-20 02:28:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-20 13:26:42 -0400 |
commit | b37ad28bcaa7c486a4ff0fb6c3bdaaacd67b86ce (patch) | |
tree | 17bb3677f3e63dc469b64a123a74cee0266768df /fs/nfsd/nfs4state.c | |
parent | 6264d69d7df654ca64f625e9409189a0e50734e9 (diff) |
[PATCH] nfsd: nfs4 code returns error values in net-endian
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Acked-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r-- | fs/nfsd/nfs4state.c | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index ebcf226a9e4a..e5ca6d7028df 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -710,7 +710,7 @@ out_err: | |||
710 | * as described above. | 710 | * as described above. |
711 | * | 711 | * |
712 | */ | 712 | */ |
713 | int | 713 | __be32 |
714 | nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_setclientid *setclid) | 714 | nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_setclientid *setclid) |
715 | { | 715 | { |
716 | u32 ip_addr = rqstp->rq_addr.sin_addr.s_addr; | 716 | u32 ip_addr = rqstp->rq_addr.sin_addr.s_addr; |
@@ -721,7 +721,7 @@ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_setclientid *setclid) | |||
721 | nfs4_verifier clverifier = setclid->se_verf; | 721 | nfs4_verifier clverifier = setclid->se_verf; |
722 | unsigned int strhashval; | 722 | unsigned int strhashval; |
723 | struct nfs4_client *conf, *unconf, *new; | 723 | struct nfs4_client *conf, *unconf, *new; |
724 | int status; | 724 | __be32 status; |
725 | char dname[HEXDIR_LEN]; | 725 | char dname[HEXDIR_LEN]; |
726 | 726 | ||
727 | if (!check_name(clname)) | 727 | if (!check_name(clname)) |
@@ -875,14 +875,14 @@ out: | |||
875 | * | 875 | * |
876 | * NOTE: callback information will be processed here in a future patch | 876 | * NOTE: callback information will be processed here in a future patch |
877 | */ | 877 | */ |
878 | int | 878 | __be32 |
879 | nfsd4_setclientid_confirm(struct svc_rqst *rqstp, struct nfsd4_setclientid_confirm *setclientid_confirm) | 879 | nfsd4_setclientid_confirm(struct svc_rqst *rqstp, struct nfsd4_setclientid_confirm *setclientid_confirm) |
880 | { | 880 | { |
881 | u32 ip_addr = rqstp->rq_addr.sin_addr.s_addr; | 881 | u32 ip_addr = rqstp->rq_addr.sin_addr.s_addr; |
882 | struct nfs4_client *conf, *unconf; | 882 | struct nfs4_client *conf, *unconf; |
883 | nfs4_verifier confirm = setclientid_confirm->sc_confirm; | 883 | nfs4_verifier confirm = setclientid_confirm->sc_confirm; |
884 | clientid_t * clid = &setclientid_confirm->sc_clientid; | 884 | clientid_t * clid = &setclientid_confirm->sc_clientid; |
885 | int status; | 885 | __be32 status; |
886 | 886 | ||
887 | if (STALE_CLIENTID(clid)) | 887 | if (STALE_CLIENTID(clid)) |
888 | return nfserr_stale_clientid; | 888 | return nfserr_stale_clientid; |
@@ -1280,13 +1280,13 @@ test_share(struct nfs4_stateid *stp, struct nfsd4_open *open) { | |||
1280 | * Called to check deny when READ with all zero stateid or | 1280 | * Called to check deny when READ with all zero stateid or |
1281 | * WRITE with all zero or all one stateid | 1281 | * WRITE with all zero or all one stateid |
1282 | */ | 1282 | */ |
1283 | static int | 1283 | static __be32 |
1284 | nfs4_share_conflict(struct svc_fh *current_fh, unsigned int deny_type) | 1284 | nfs4_share_conflict(struct svc_fh *current_fh, unsigned int deny_type) |
1285 | { | 1285 | { |
1286 | struct inode *ino = current_fh->fh_dentry->d_inode; | 1286 | struct inode *ino = current_fh->fh_dentry->d_inode; |
1287 | struct nfs4_file *fp; | 1287 | struct nfs4_file *fp; |
1288 | struct nfs4_stateid *stp; | 1288 | struct nfs4_stateid *stp; |
1289 | int ret; | 1289 | __be32 ret; |
1290 | 1290 | ||
1291 | dprintk("NFSD: nfs4_share_conflict\n"); | 1291 | dprintk("NFSD: nfs4_share_conflict\n"); |
1292 | 1292 | ||
@@ -1444,7 +1444,7 @@ static struct lock_manager_operations nfsd_lease_mng_ops = { | |||
1444 | }; | 1444 | }; |
1445 | 1445 | ||
1446 | 1446 | ||
1447 | int | 1447 | __be32 |
1448 | nfsd4_process_open1(struct nfsd4_open *open) | 1448 | nfsd4_process_open1(struct nfsd4_open *open) |
1449 | { | 1449 | { |
1450 | clientid_t *clientid = &open->op_clientid; | 1450 | clientid_t *clientid = &open->op_clientid; |
@@ -1501,7 +1501,7 @@ renew: | |||
1501 | return nfs_ok; | 1501 | return nfs_ok; |
1502 | } | 1502 | } |
1503 | 1503 | ||
1504 | static inline int | 1504 | static inline __be32 |
1505 | nfs4_check_delegmode(struct nfs4_delegation *dp, int flags) | 1505 | nfs4_check_delegmode(struct nfs4_delegation *dp, int flags) |
1506 | { | 1506 | { |
1507 | if ((flags & WR_STATE) && (dp->dl_type == NFS4_OPEN_DELEGATE_READ)) | 1507 | if ((flags & WR_STATE) && (dp->dl_type == NFS4_OPEN_DELEGATE_READ)) |
@@ -1522,12 +1522,12 @@ find_delegation_file(struct nfs4_file *fp, stateid_t *stid) | |||
1522 | return NULL; | 1522 | return NULL; |
1523 | } | 1523 | } |
1524 | 1524 | ||
1525 | static int | 1525 | static __be32 |
1526 | nfs4_check_deleg(struct nfs4_file *fp, struct nfsd4_open *open, | 1526 | nfs4_check_deleg(struct nfs4_file *fp, struct nfsd4_open *open, |
1527 | struct nfs4_delegation **dp) | 1527 | struct nfs4_delegation **dp) |
1528 | { | 1528 | { |
1529 | int flags; | 1529 | int flags; |
1530 | int status = nfserr_bad_stateid; | 1530 | __be32 status = nfserr_bad_stateid; |
1531 | 1531 | ||
1532 | *dp = find_delegation_file(fp, &open->op_delegate_stateid); | 1532 | *dp = find_delegation_file(fp, &open->op_delegate_stateid); |
1533 | if (*dp == NULL) | 1533 | if (*dp == NULL) |
@@ -1546,11 +1546,11 @@ out: | |||
1546 | return nfs_ok; | 1546 | return nfs_ok; |
1547 | } | 1547 | } |
1548 | 1548 | ||
1549 | static int | 1549 | static __be32 |
1550 | nfs4_check_open(struct nfs4_file *fp, struct nfsd4_open *open, struct nfs4_stateid **stpp) | 1550 | nfs4_check_open(struct nfs4_file *fp, struct nfsd4_open *open, struct nfs4_stateid **stpp) |
1551 | { | 1551 | { |
1552 | struct nfs4_stateid *local; | 1552 | struct nfs4_stateid *local; |
1553 | int status = nfserr_share_denied; | 1553 | __be32 status = nfserr_share_denied; |
1554 | struct nfs4_stateowner *sop = open->op_stateowner; | 1554 | struct nfs4_stateowner *sop = open->op_stateowner; |
1555 | 1555 | ||
1556 | list_for_each_entry(local, &fp->fi_stateids, st_perfile) { | 1556 | list_for_each_entry(local, &fp->fi_stateids, st_perfile) { |
@@ -1575,7 +1575,7 @@ nfs4_alloc_stateid(void) | |||
1575 | return kmem_cache_alloc(stateid_slab, GFP_KERNEL); | 1575 | return kmem_cache_alloc(stateid_slab, GFP_KERNEL); |
1576 | } | 1576 | } |
1577 | 1577 | ||
1578 | static int | 1578 | static __be32 |
1579 | nfs4_new_open(struct svc_rqst *rqstp, struct nfs4_stateid **stpp, | 1579 | nfs4_new_open(struct svc_rqst *rqstp, struct nfs4_stateid **stpp, |
1580 | struct nfs4_delegation *dp, | 1580 | struct nfs4_delegation *dp, |
1581 | struct svc_fh *cur_fh, int flags) | 1581 | struct svc_fh *cur_fh, int flags) |
@@ -1590,7 +1590,7 @@ nfs4_new_open(struct svc_rqst *rqstp, struct nfs4_stateid **stpp, | |||
1590 | get_file(dp->dl_vfs_file); | 1590 | get_file(dp->dl_vfs_file); |
1591 | stp->st_vfs_file = dp->dl_vfs_file; | 1591 | stp->st_vfs_file = dp->dl_vfs_file; |
1592 | } else { | 1592 | } else { |
1593 | int status; | 1593 | __be32 status; |
1594 | status = nfsd_open(rqstp, cur_fh, S_IFREG, flags, | 1594 | status = nfsd_open(rqstp, cur_fh, S_IFREG, flags, |
1595 | &stp->st_vfs_file); | 1595 | &stp->st_vfs_file); |
1596 | if (status) { | 1596 | if (status) { |
@@ -1604,7 +1604,7 @@ nfs4_new_open(struct svc_rqst *rqstp, struct nfs4_stateid **stpp, | |||
1604 | return 0; | 1604 | return 0; |
1605 | } | 1605 | } |
1606 | 1606 | ||
1607 | static inline int | 1607 | static inline __be32 |
1608 | nfsd4_truncate(struct svc_rqst *rqstp, struct svc_fh *fh, | 1608 | nfsd4_truncate(struct svc_rqst *rqstp, struct svc_fh *fh, |
1609 | struct nfsd4_open *open) | 1609 | struct nfsd4_open *open) |
1610 | { | 1610 | { |
@@ -1619,22 +1619,22 @@ nfsd4_truncate(struct svc_rqst *rqstp, struct svc_fh *fh, | |||
1619 | return nfsd_setattr(rqstp, fh, &iattr, 0, (time_t)0); | 1619 | return nfsd_setattr(rqstp, fh, &iattr, 0, (time_t)0); |
1620 | } | 1620 | } |
1621 | 1621 | ||
1622 | static int | 1622 | static __be32 |
1623 | nfs4_upgrade_open(struct svc_rqst *rqstp, struct svc_fh *cur_fh, struct nfs4_stateid *stp, struct nfsd4_open *open) | 1623 | nfs4_upgrade_open(struct svc_rqst *rqstp, struct svc_fh *cur_fh, struct nfs4_stateid *stp, struct nfsd4_open *open) |
1624 | { | 1624 | { |
1625 | struct file *filp = stp->st_vfs_file; | 1625 | struct file *filp = stp->st_vfs_file; |
1626 | struct inode *inode = filp->f_dentry->d_inode; | 1626 | struct inode *inode = filp->f_dentry->d_inode; |
1627 | unsigned int share_access, new_writer; | 1627 | unsigned int share_access, new_writer; |
1628 | int status; | 1628 | __be32 status; |
1629 | 1629 | ||
1630 | set_access(&share_access, stp->st_access_bmap); | 1630 | set_access(&share_access, stp->st_access_bmap); |
1631 | new_writer = (~share_access) & open->op_share_access | 1631 | new_writer = (~share_access) & open->op_share_access |
1632 | & NFS4_SHARE_ACCESS_WRITE; | 1632 | & NFS4_SHARE_ACCESS_WRITE; |
1633 | 1633 | ||
1634 | if (new_writer) { | 1634 | if (new_writer) { |
1635 | status = get_write_access(inode); | 1635 | int err = get_write_access(inode); |
1636 | if (status) | 1636 | if (err) |
1637 | return nfserrno(status); | 1637 | return nfserrno(err); |
1638 | } | 1638 | } |
1639 | status = nfsd4_truncate(rqstp, cur_fh, open); | 1639 | status = nfsd4_truncate(rqstp, cur_fh, open); |
1640 | if (status) { | 1640 | if (status) { |
@@ -1738,14 +1738,14 @@ out: | |||
1738 | /* | 1738 | /* |
1739 | * called with nfs4_lock_state() held. | 1739 | * called with nfs4_lock_state() held. |
1740 | */ | 1740 | */ |
1741 | int | 1741 | __be32 |
1742 | nfsd4_process_open2(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_open *open) | 1742 | nfsd4_process_open2(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_open *open) |
1743 | { | 1743 | { |
1744 | struct nfs4_file *fp = NULL; | 1744 | struct nfs4_file *fp = NULL; |
1745 | struct inode *ino = current_fh->fh_dentry->d_inode; | 1745 | struct inode *ino = current_fh->fh_dentry->d_inode; |
1746 | struct nfs4_stateid *stp = NULL; | 1746 | struct nfs4_stateid *stp = NULL; |
1747 | struct nfs4_delegation *dp = NULL; | 1747 | struct nfs4_delegation *dp = NULL; |
1748 | int status; | 1748 | __be32 status; |
1749 | 1749 | ||
1750 | status = nfserr_inval; | 1750 | status = nfserr_inval; |
1751 | if (!access_valid(open->op_share_access) | 1751 | if (!access_valid(open->op_share_access) |
@@ -1833,11 +1833,11 @@ static struct work_struct laundromat_work; | |||
1833 | static void laundromat_main(void *); | 1833 | static void laundromat_main(void *); |
1834 | static DECLARE_WORK(laundromat_work, laundromat_main, NULL); | 1834 | static DECLARE_WORK(laundromat_work, laundromat_main, NULL); |
1835 | 1835 | ||
1836 | int | 1836 | __be32 |
1837 | nfsd4_renew(clientid_t *clid) | 1837 | nfsd4_renew(clientid_t *clid) |
1838 | { | 1838 | { |
1839 | struct nfs4_client *clp; | 1839 | struct nfs4_client *clp; |
1840 | int status; | 1840 | __be32 status; |
1841 | 1841 | ||
1842 | nfs4_lock_state(); | 1842 | nfs4_lock_state(); |
1843 | dprintk("process_renew(%08x/%08x): starting\n", | 1843 | dprintk("process_renew(%08x/%08x): starting\n", |
@@ -1996,9 +1996,9 @@ access_permit_write(unsigned long access_bmap) | |||
1996 | } | 1996 | } |
1997 | 1997 | ||
1998 | static | 1998 | static |
1999 | int nfs4_check_openmode(struct nfs4_stateid *stp, int flags) | 1999 | __be32 nfs4_check_openmode(struct nfs4_stateid *stp, int flags) |
2000 | { | 2000 | { |
2001 | int status = nfserr_openmode; | 2001 | __be32 status = nfserr_openmode; |
2002 | 2002 | ||
2003 | if ((flags & WR_STATE) && (!access_permit_write(stp->st_access_bmap))) | 2003 | if ((flags & WR_STATE) && (!access_permit_write(stp->st_access_bmap))) |
2004 | goto out; | 2004 | goto out; |
@@ -2009,7 +2009,7 @@ out: | |||
2009 | return status; | 2009 | return status; |
2010 | } | 2010 | } |
2011 | 2011 | ||
2012 | static inline int | 2012 | static inline __be32 |
2013 | check_special_stateids(svc_fh *current_fh, stateid_t *stateid, int flags) | 2013 | check_special_stateids(svc_fh *current_fh, stateid_t *stateid, int flags) |
2014 | { | 2014 | { |
2015 | /* Trying to call delegreturn with a special stateid? Yuch: */ | 2015 | /* Trying to call delegreturn with a special stateid? Yuch: */ |
@@ -2043,14 +2043,14 @@ io_during_grace_disallowed(struct inode *inode, int flags) | |||
2043 | /* | 2043 | /* |
2044 | * Checks for stateid operations | 2044 | * Checks for stateid operations |
2045 | */ | 2045 | */ |
2046 | int | 2046 | __be32 |
2047 | nfs4_preprocess_stateid_op(struct svc_fh *current_fh, stateid_t *stateid, int flags, struct file **filpp) | 2047 | nfs4_preprocess_stateid_op(struct svc_fh *current_fh, stateid_t *stateid, int flags, struct file **filpp) |
2048 | { | 2048 | { |
2049 | struct nfs4_stateid *stp = NULL; | 2049 | struct nfs4_stateid *stp = NULL; |
2050 | struct nfs4_delegation *dp = NULL; | 2050 | struct nfs4_delegation *dp = NULL; |
2051 | stateid_t *stidp; | 2051 | stateid_t *stidp; |
2052 | struct inode *ino = current_fh->fh_dentry->d_inode; | 2052 | struct inode *ino = current_fh->fh_dentry->d_inode; |
2053 | int status; | 2053 | __be32 status; |
2054 | 2054 | ||
2055 | dprintk("NFSD: preprocess_stateid_op: stateid = (%08x/%08x/%08x/%08x)\n", | 2055 | dprintk("NFSD: preprocess_stateid_op: stateid = (%08x/%08x/%08x/%08x)\n", |
2056 | stateid->si_boot, stateid->si_stateownerid, | 2056 | stateid->si_boot, stateid->si_stateownerid, |
@@ -2125,7 +2125,7 @@ setlkflg (int type) | |||
2125 | /* | 2125 | /* |
2126 | * Checks for sequence id mutating operations. | 2126 | * Checks for sequence id mutating operations. |
2127 | */ | 2127 | */ |
2128 | static int | 2128 | static __be32 |
2129 | nfs4_preprocess_seqid_op(struct svc_fh *current_fh, u32 seqid, stateid_t *stateid, int flags, struct nfs4_stateowner **sopp, struct nfs4_stateid **stpp, struct nfsd4_lock *lock) | 2129 | nfs4_preprocess_seqid_op(struct svc_fh *current_fh, u32 seqid, stateid_t *stateid, int flags, struct nfs4_stateowner **sopp, struct nfs4_stateid **stpp, struct nfsd4_lock *lock) |
2130 | { | 2130 | { |
2131 | struct nfs4_stateid *stp; | 2131 | struct nfs4_stateid *stp; |
@@ -2169,7 +2169,7 @@ nfs4_preprocess_seqid_op(struct svc_fh *current_fh, u32 seqid, stateid_t *statei | |||
2169 | clientid_t *lockclid = &lock->v.new.clientid; | 2169 | clientid_t *lockclid = &lock->v.new.clientid; |
2170 | struct nfs4_client *clp = sop->so_client; | 2170 | struct nfs4_client *clp = sop->so_client; |
2171 | int lkflg = 0; | 2171 | int lkflg = 0; |
2172 | int status; | 2172 | __be32 status; |
2173 | 2173 | ||
2174 | lkflg = setlkflg(lock->lk_type); | 2174 | lkflg = setlkflg(lock->lk_type); |
2175 | 2175 | ||
@@ -2241,10 +2241,10 @@ check_replay: | |||
2241 | return nfserr_bad_seqid; | 2241 | return nfserr_bad_seqid; |
2242 | } | 2242 | } |
2243 | 2243 | ||
2244 | int | 2244 | __be32 |
2245 | nfsd4_open_confirm(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_open_confirm *oc, struct nfs4_stateowner **replay_owner) | 2245 | nfsd4_open_confirm(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_open_confirm *oc, struct nfs4_stateowner **replay_owner) |
2246 | { | 2246 | { |
2247 | int status; | 2247 | __be32 status; |
2248 | struct nfs4_stateowner *sop; | 2248 | struct nfs4_stateowner *sop; |
2249 | struct nfs4_stateid *stp; | 2249 | struct nfs4_stateid *stp; |
2250 | 2250 | ||
@@ -2310,10 +2310,10 @@ reset_union_bmap_deny(unsigned long deny, unsigned long *bmap) | |||
2310 | } | 2310 | } |
2311 | } | 2311 | } |
2312 | 2312 | ||
2313 | int | 2313 | __be32 |
2314 | nfsd4_open_downgrade(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_open_downgrade *od, struct nfs4_stateowner **replay_owner) | 2314 | nfsd4_open_downgrade(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_open_downgrade *od, struct nfs4_stateowner **replay_owner) |
2315 | { | 2315 | { |
2316 | int status; | 2316 | __be32 status; |
2317 | struct nfs4_stateid *stp; | 2317 | struct nfs4_stateid *stp; |
2318 | unsigned int share_access; | 2318 | unsigned int share_access; |
2319 | 2319 | ||
@@ -2365,10 +2365,10 @@ out: | |||
2365 | /* | 2365 | /* |
2366 | * nfs4_unlock_state() called after encode | 2366 | * nfs4_unlock_state() called after encode |
2367 | */ | 2367 | */ |
2368 | int | 2368 | __be32 |
2369 | nfsd4_close(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_close *close, struct nfs4_stateowner **replay_owner) | 2369 | nfsd4_close(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_close *close, struct nfs4_stateowner **replay_owner) |
2370 | { | 2370 | { |
2371 | int status; | 2371 | __be32 status; |
2372 | struct nfs4_stateid *stp; | 2372 | struct nfs4_stateid *stp; |
2373 | 2373 | ||
2374 | dprintk("NFSD: nfsd4_close on file %.*s\n", | 2374 | dprintk("NFSD: nfsd4_close on file %.*s\n", |
@@ -2404,10 +2404,10 @@ out: | |||
2404 | return status; | 2404 | return status; |
2405 | } | 2405 | } |
2406 | 2406 | ||
2407 | int | 2407 | __be32 |
2408 | nfsd4_delegreturn(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_delegreturn *dr) | 2408 | nfsd4_delegreturn(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_delegreturn *dr) |
2409 | { | 2409 | { |
2410 | int status; | 2410 | __be32 status; |
2411 | 2411 | ||
2412 | if ((status = fh_verify(rqstp, current_fh, S_IFREG, 0))) | 2412 | if ((status = fh_verify(rqstp, current_fh, S_IFREG, 0))) |
2413 | goto out; | 2413 | goto out; |
@@ -2635,7 +2635,7 @@ check_lock_length(u64 offset, u64 length) | |||
2635 | /* | 2635 | /* |
2636 | * LOCK operation | 2636 | * LOCK operation |
2637 | */ | 2637 | */ |
2638 | int | 2638 | __be32 |
2639 | nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock *lock, struct nfs4_stateowner **replay_owner) | 2639 | nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock *lock, struct nfs4_stateowner **replay_owner) |
2640 | { | 2640 | { |
2641 | struct nfs4_stateowner *open_sop = NULL; | 2641 | struct nfs4_stateowner *open_sop = NULL; |
@@ -2644,7 +2644,7 @@ nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock | |||
2644 | struct file *filp; | 2644 | struct file *filp; |
2645 | struct file_lock file_lock; | 2645 | struct file_lock file_lock; |
2646 | struct file_lock conflock; | 2646 | struct file_lock conflock; |
2647 | int status = 0; | 2647 | __be32 status = 0; |
2648 | unsigned int strhashval; | 2648 | unsigned int strhashval; |
2649 | 2649 | ||
2650 | dprintk("NFSD: nfsd4_lock: start=%Ld length=%Ld\n", | 2650 | dprintk("NFSD: nfsd4_lock: start=%Ld length=%Ld\n", |
@@ -2793,14 +2793,14 @@ out: | |||
2793 | /* | 2793 | /* |
2794 | * LOCKT operation | 2794 | * LOCKT operation |
2795 | */ | 2795 | */ |
2796 | int | 2796 | __be32 |
2797 | nfsd4_lockt(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lockt *lockt) | 2797 | nfsd4_lockt(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lockt *lockt) |
2798 | { | 2798 | { |
2799 | struct inode *inode; | 2799 | struct inode *inode; |
2800 | struct file file; | 2800 | struct file file; |
2801 | struct file_lock file_lock; | 2801 | struct file_lock file_lock; |
2802 | struct file_lock conflock; | 2802 | struct file_lock conflock; |
2803 | int status; | 2803 | __be32 status; |
2804 | 2804 | ||
2805 | if (nfs4_in_grace()) | 2805 | if (nfs4_in_grace()) |
2806 | return nfserr_grace; | 2806 | return nfserr_grace; |
@@ -2873,13 +2873,13 @@ out: | |||
2873 | return status; | 2873 | return status; |
2874 | } | 2874 | } |
2875 | 2875 | ||
2876 | int | 2876 | __be32 |
2877 | nfsd4_locku(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_locku *locku, struct nfs4_stateowner **replay_owner) | 2877 | nfsd4_locku(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_locku *locku, struct nfs4_stateowner **replay_owner) |
2878 | { | 2878 | { |
2879 | struct nfs4_stateid *stp; | 2879 | struct nfs4_stateid *stp; |
2880 | struct file *filp = NULL; | 2880 | struct file *filp = NULL; |
2881 | struct file_lock file_lock; | 2881 | struct file_lock file_lock; |
2882 | int status; | 2882 | __be32 status; |
2883 | 2883 | ||
2884 | dprintk("NFSD: nfsd4_locku: start=%Ld length=%Ld\n", | 2884 | dprintk("NFSD: nfsd4_locku: start=%Ld length=%Ld\n", |
2885 | (long long) locku->lu_offset, | 2885 | (long long) locku->lu_offset, |
@@ -2965,7 +2965,7 @@ out: | |||
2965 | return status; | 2965 | return status; |
2966 | } | 2966 | } |
2967 | 2967 | ||
2968 | int | 2968 | __be32 |
2969 | nfsd4_release_lockowner(struct svc_rqst *rqstp, struct nfsd4_release_lockowner *rlockowner) | 2969 | nfsd4_release_lockowner(struct svc_rqst *rqstp, struct nfsd4_release_lockowner *rlockowner) |
2970 | { | 2970 | { |
2971 | clientid_t *clid = &rlockowner->rl_clientid; | 2971 | clientid_t *clid = &rlockowner->rl_clientid; |
@@ -2974,7 +2974,7 @@ nfsd4_release_lockowner(struct svc_rqst *rqstp, struct nfsd4_release_lockowner * | |||
2974 | struct xdr_netobj *owner = &rlockowner->rl_owner; | 2974 | struct xdr_netobj *owner = &rlockowner->rl_owner; |
2975 | struct list_head matches; | 2975 | struct list_head matches; |
2976 | int i; | 2976 | int i; |
2977 | int status; | 2977 | __be32 status; |
2978 | 2978 | ||
2979 | dprintk("nfsd4_release_lockowner clientid: (%08x/%08x):\n", | 2979 | dprintk("nfsd4_release_lockowner clientid: (%08x/%08x):\n", |
2980 | clid->cl_boot, clid->cl_id); | 2980 | clid->cl_boot, clid->cl_id); |
@@ -3111,7 +3111,7 @@ nfs4_find_reclaim_client(clientid_t *clid) | |||
3111 | /* | 3111 | /* |
3112 | * Called from OPEN. Look for clientid in reclaim list. | 3112 | * Called from OPEN. Look for clientid in reclaim list. |
3113 | */ | 3113 | */ |
3114 | int | 3114 | __be32 |
3115 | nfs4_check_open_reclaim(clientid_t *clid) | 3115 | nfs4_check_open_reclaim(clientid_t *clid) |
3116 | { | 3116 | { |
3117 | return nfs4_find_reclaim_client(clid) ? nfs_ok : nfserr_reclaim_bad; | 3117 | return nfs4_find_reclaim_client(clid) ? nfs_ok : nfserr_reclaim_bad; |