diff options
Diffstat (limited to 'fs/nfsd/vfs.c')
-rw-r--r-- | fs/nfsd/vfs.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index 43bd776c4882..a11b0e8678ee 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/fcntl.h> | 20 | #include <linux/fcntl.h> |
21 | #include <linux/namei.h> | 21 | #include <linux/namei.h> |
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
23 | #include <linux/quotaops.h> | ||
24 | #include <linux/fsnotify.h> | 23 | #include <linux/fsnotify.h> |
25 | #include <linux/posix_acl_xattr.h> | 24 | #include <linux/posix_acl_xattr.h> |
26 | #include <linux/xattr.h> | 25 | #include <linux/xattr.h> |
@@ -389,7 +388,7 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap, | |||
389 | * If we are changing the size of the file, then | 388 | * If we are changing the size of the file, then |
390 | * we need to break all leases. | 389 | * we need to break all leases. |
391 | */ | 390 | */ |
392 | host_err = break_lease(inode, FMODE_WRITE | O_NONBLOCK); | 391 | host_err = break_lease(inode, O_WRONLY | O_NONBLOCK); |
393 | if (host_err == -EWOULDBLOCK) | 392 | if (host_err == -EWOULDBLOCK) |
394 | host_err = -ETIMEDOUT; | 393 | host_err = -ETIMEDOUT; |
395 | if (host_err) /* ENOMEM or EWOULDBLOCK */ | 394 | if (host_err) /* ENOMEM or EWOULDBLOCK */ |
@@ -405,7 +404,6 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap, | |||
405 | put_write_access(inode); | 404 | put_write_access(inode); |
406 | goto out_nfserr; | 405 | goto out_nfserr; |
407 | } | 406 | } |
408 | vfs_dq_init(inode); | ||
409 | } | 407 | } |
410 | 408 | ||
411 | /* sanitize the mode change */ | 409 | /* sanitize the mode change */ |
@@ -762,7 +760,7 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, | |||
762 | * Check to see if there are any leases on this file. | 760 | * Check to see if there are any leases on this file. |
763 | * This may block while leases are broken. | 761 | * This may block while leases are broken. |
764 | */ | 762 | */ |
765 | host_err = break_lease(inode, O_NONBLOCK | ((access & NFSD_MAY_WRITE) ? FMODE_WRITE : 0)); | 763 | host_err = break_lease(inode, O_NONBLOCK | ((access & NFSD_MAY_WRITE) ? O_WRONLY : 0)); |
766 | if (host_err == -EWOULDBLOCK) | 764 | if (host_err == -EWOULDBLOCK) |
767 | host_err = -ETIMEDOUT; | 765 | host_err = -ETIMEDOUT; |
768 | if (host_err) /* NOMEM or WOULDBLOCK */ | 766 | if (host_err) /* NOMEM or WOULDBLOCK */ |
@@ -773,8 +771,6 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, | |||
773 | flags = O_RDWR|O_LARGEFILE; | 771 | flags = O_RDWR|O_LARGEFILE; |
774 | else | 772 | else |
775 | flags = O_WRONLY|O_LARGEFILE; | 773 | flags = O_WRONLY|O_LARGEFILE; |
776 | |||
777 | vfs_dq_init(inode); | ||
778 | } | 774 | } |
779 | *filp = dentry_open(dget(dentry), mntget(fhp->fh_export->ex_path.mnt), | 775 | *filp = dentry_open(dget(dentry), mntget(fhp->fh_export->ex_path.mnt), |
780 | flags, current_cred()); | 776 | flags, current_cred()); |