projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge tag 'dm-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper...
[firefly-linux-kernel-4.4.55.git]
/
fs
/
nfs
/
inode.c
diff --git
a/fs/nfs/inode.c
b/fs/nfs/inode.c
index 577a36f0a510b27cefe15429523750b6d21ca45a..141c9f4a40de31b3237f50a4e5bf8d02e49cce80 100644
(file)
--- a/
fs/nfs/inode.c
+++ b/
fs/nfs/inode.c
@@
-505,7
+505,9
@@
nfs_setattr(struct dentry *dentry, struct iattr *attr)
attr->ia_valid &= ~ATTR_MODE;
if (attr->ia_valid & ATTR_SIZE) {
- if (!S_ISREG(inode->i_mode) || attr->ia_size == i_size_read(inode))
+ BUG_ON(!S_ISREG(inode->i_mode));
+
+ if (attr->ia_size == i_size_read(inode))
attr->ia_valid &= ~ATTR_SIZE;
}