From b133049aa56c126b86752cdc9929ec865d904aa2 Mon Sep 17 00:00:00 2001 From: adilger Date: Wed, 12 Jun 2002 00:17:40 +0000 Subject: [PATCH] Check the f_mode field instead of the f_flags field when using FMODE_ masks. --- lustre/llite/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/llite/file.c b/lustre/llite/file.c index e2e29f8..834c35b 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -117,7 +117,7 @@ static int ll_file_release(struct inode *inode, struct file *file) GOTO(out_fd, abs(rc)); } - if (file->f_flags & FMODE_WRITE) { + if (file->f_mode & FMODE_WRITE) { struct iattr attr; attr.ia_valid = ATTR_MTIME | ATTR_CTIME | ATTR_ATIME | ATTR_SIZE; attr.ia_mtime = inode->i_mtime; -- 1.8.3.1