[RHEL7,COMMIT] fuse: Revert "fuse: report size from server if no openers exist"

Submitted by Konstantin Khorenko on July 10, 2018, 4:01 p.m.

Details

Message ID 201807101601.w6AG1TCV028987@finist_ce7.work
State New
Series "fuse: Revert "fuse: report size from server if no openers exist""
Headers show

Commit Message

Konstantin Khorenko July 10, 2018, 4:01 p.m.
The commit is pushed to "branch-rh7-3.10.0-862.6.3.vz7.62.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.6.3.vz7.62.2
------>
commit c3e5f43de78c58c600e9ce33f870484bc982cefd
Author: Kirill Tkhai <ktkhai@virtuozzo.com>
Date:   Tue Jul 10 19:01:29 2018 +0300

    fuse: Revert "fuse: report size from server if no openers exist"
    
    This reverts commit dee8f9cf51ec5c26f771475ae73176904d6fc830.
    
    The patch is not needed anymore (actually noop) after this fix:
    0dd16f58f669 ("fuse: trust server file size unless opened")
    
    Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
    Reviewed-by: Pavel Butsykin <pbutsykin@virtuozzo.com>
---
 fs/fuse/dir.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Patch hide | download patch | download mbox

diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index 03fe07260c13..66eff240cbb6 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -1003,12 +1003,8 @@  static int fuse_do_getattr(struct inode *inode, struct kstat *stat,
 					       attr_version);
 			if (get_size_form_attr)
 				stat->size = outarg.attr.size;
-			else if (stat) {
-				struct fuse_inode *fi = get_fuse_inode(inode);
+			else if (stat)
 				fuse_fillattr(inode, &outarg.attr, stat);
-				if (!atomic_read(&fi->num_openers))
-					stat->size = outarg.attr.size;
-			}
 		}
 	}
 	return err;