Whamcloud - gitweb
Check the f_mode field instead of the f_flags field when using FMODE_ masks.
authoradilger <adilger>
Wed, 12 Jun 2002 00:17:40 +0000 (00:17 +0000)
committeradilger <adilger>
Wed, 12 Jun 2002 00:17:40 +0000 (00:17 +0000)
lustre/llite/file.c

index e2e29f8..834c35b 100644 (file)
@@ -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;