Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 231185
b: refs/heads/master
c: 6a76beb
h: refs/heads/master
i:
  231183: 9140bfb
v: v3
  • Loading branch information
J. Bruce Fields committed Jan 14, 2011
1 parent 5c51ead commit 17383c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 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: 9ce137eee4febaabca81143be07d4205d2bd52d4
refs/heads/master: 6a76bebefe15d9a08864f824d7f8d5beaf37c997
12 changes: 4 additions & 8 deletions trunk/fs/nfsd/vfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,14 +374,6 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap,
goto out;
}

/*
* If we are changing the size of the file, then
* we need to break all leases.
*/
host_err = break_lease(inode, O_WRONLY | O_NONBLOCK);
if (host_err) /* ENOMEM or EWOULDBLOCK */
goto out_nfserr;

host_err = get_write_access(inode);
if (host_err)
goto out_nfserr;
Expand Down Expand Up @@ -422,7 +414,11 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap,

err = nfserr_notsync;
if (!check_guard || guardtime == inode->i_ctime.tv_sec) {
host_err = break_lease(inode, O_WRONLY | O_NONBLOCK);
if (host_err)
goto out_nfserr;
fh_lock(fhp);

host_err = notify_change(dentry, iap);
err = nfserrno(host_err);
fh_unlock(fhp);
Expand Down

0 comments on commit 17383c9

Please sign in to comment.