Hi all, Today's linux-next merge of the integrity tree got a conflict in fs/nfsd/vfs.c between commit 9b638b816081 ("NFSD: Put file after ima_file_check fail in nfsd_open()") from the nfsd tree and commit e8442e203c25 ("ima: pass 'opened' flag to identify newly created files") from the integrity tree. I fixed it up (see below) and can carry the fix as necessary (no action is required). -- Cheers, Stephen Rothwell sfr@canb.auug.org.au diff --cc fs/nfsd/vfs.c index 89d1ae3bcff7,d49c778faecb..000000000000 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c @@@ -704,25 -704,19 +704,25 @@@ nfsd_open(struct svc_rqst *rqstp, struc else flags = O_WRONLY|O_LARGEFILE; } - *filp = dentry_open(&path, flags, current_cred()); - if (IS_ERR(*filp)) { - host_err = PTR_ERR(*filp); - *filp = NULL; - } else { - host_err = ima_file_check(*filp, may_flags, 0); - if (may_flags & NFSD_MAY_64BIT_COOKIE) - (*filp)->f_mode |= FMODE_64BITHASH; - else - (*filp)->f_mode |= FMODE_32BITHASH; + file = dentry_open(&path, flags, current_cred()); + if (IS_ERR(file)) { + host_err = PTR_ERR(file); + goto out_nfserr; } - host_err = ima_file_check(file, may_flags); ++ host_err = ima_file_check(file, may_flags, 0); + if (host_err) { + nfsd_close(file); + goto out_nfserr; + } + + if (may_flags & NFSD_MAY_64BIT_COOKIE) + file->f_mode |= FMODE_64BITHASH; + else + file->f_mode |= FMODE_32BITHASH; + + *filp = file; out_nfserr: err = nfserrno(host_err); out: