mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Christian Brauner <brauner@kernel.org>
Cc: Jan Kara <jack@suse.cz>, I Hsin Cheng <richard120310@gmail.com>,
	viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] file: Wrap locking mechanism for f_pos_lock
Date: Wed, 4 Dec 2024 13:48:29 +0100	[thread overview]
Message-ID: <20241204124829.4xpciqbz73u2e2nc@quack3> (raw)
In-Reply-To: <20241204-osterblume-blasorchester-2b05c8ee6ace@brauner>

On Wed 04-12-24 12:11:02, Christian Brauner wrote:
> > motivation of introducing __f_unlock_pos() in the first place? It has one
> 
> May I venture a guess:
> 
>   CALL    ../scripts/checksyscalls.sh
>   INSTALL libsubcmd_headers
>   INSTALL libsubcmd_headers
>   CC      fs/read_write.o
> In file included from ../fs/read_write.c:12:
> ../include/linux/file.h:78:27: error: incomplete definition of type 'struct file'
>    78 |                 mutex_unlock(&fd_file(f)->f_pos_lock);
>       |                               ~~~~~~~~~~^
> 
> If you don't include linux/fs.h before linux/file.h you'd get compilation
> errors and we don't want to include linux/fs.h in linux/file.h.

Ah, subtle ;)

> I wouldn't add another wrapper for lock though. Just put a comment on top of
> __f_unlock_pos().       

Yes, I guess comment is better in that case.

								Honza

-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

  reply	other threads:[~2024-12-04 12:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-04  9:23 I Hsin Cheng
2024-12-04 10:26 ` Jan Kara
2024-12-04 11:11   ` Christian Brauner
2024-12-04 12:48     ` Jan Kara [this message]
2024-12-04 15:33       ` I Hsin Cheng
2024-12-04 16:07         ` Christian Brauner
2024-12-04 16:34   ` Al Viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241204124829.4xpciqbz73u2e2nc@quack3 \
    --to=jack@suse.cz \
    --cc=brauner@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=richard120310@gmail.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®