Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 18962
b: refs/heads/master
c: 6c26d08
h: refs/heads/master
v: v3
  • Loading branch information
J. Bruce Fields authored and Linus Torvalds committed Jan 19, 2006
1 parent 4ed3d32 commit aaf9fd1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 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: fb553c0f17444e090db951b96df4d2d71b4f4b6b
refs/heads/master: 6c26d08f02f829a833d393c3f1b196538a9ec2c4
22 changes: 11 additions & 11 deletions trunk/fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1609,26 +1609,26 @@ nfs4_upgrade_open(struct svc_rqst *rqstp, struct svc_fh *cur_fh, struct nfs4_sta
{
struct file *filp = stp->st_vfs_file;
struct inode *inode = filp->f_dentry->d_inode;
unsigned int share_access;
unsigned int share_access, new_writer;
int status;

set_access(&share_access, stp->st_access_bmap);
share_access = ~share_access;
share_access &= open->op_share_access;

if (!(share_access & NFS4_SHARE_ACCESS_WRITE))
return nfsd4_truncate(rqstp, cur_fh, open);
new_writer = (~share_access) & open->op_share_access
& NFS4_SHARE_ACCESS_WRITE;

status = get_write_access(inode);
if (status)
return nfserrno(status);
if (new_writer) {
status = get_write_access(inode);
if (status)
return nfserrno(status);
}
status = nfsd4_truncate(rqstp, cur_fh, open);
if (status) {
put_write_access(inode);
if (new_writer)
put_write_access(inode);
return status;
}
/* remember the open */
filp->f_mode = (filp->f_mode | FMODE_WRITE) & ~FMODE_READ;
filp->f_mode |= open->op_share_access;
set_bit(open->op_share_access, &stp->st_access_bmap);
set_bit(open->op_share_deny, &stp->st_deny_bmap);

Expand Down

0 comments on commit aaf9fd1

Please sign in to comment.