mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Anton Altaparmakov <aia21@cantab.net>
To: ebiederm@xmission.com (Eric W. Biederman)
Cc: torvalds@transmeta.com (Linus Torvalds),
	linux-kernel@vger.kernel.org (Linux Kernel)
Subject: Re: [BK PATCH 2.5] fs/ntfs/dir.c: use PAGE_CACHE_MASK_LL with 64-bit values
Date: Sun, 28 Jul 2002 20:00:35 +0100	[thread overview]
Message-ID: <5.1.0.14.2.20020728195634.042be2a0@pop.cus.cam.ac.uk> (raw)
In-Reply-To: <m1sn23hgru.fsf@frodo.biederman.org>

At 19:03 28/07/02, Eric W. Biederman wrote:
>Anton Altaparmakov <aia21@cantab.net> writes:
>
> > Linus,
> >
> > Following from previous patch which introduced PAGE_CACHE_MASK_LL, this
> > one fixes a bug in fs/ntfs/dir.c which was using PAGE_CACHE_MASK
> > on 64-bit values... It now uses PAGE_CACHE_MASK_LL.
> >
> > Patch together with the other two patches available from:
> >
> >       bk pull http://linux-ntfs.bkbits.net/linux-2.5-pm
> >
> > Best regards,
> >
> >       Anton
> > --
> > Anton Altaparmakov <aia21 at cantab.net> (replace at with @)
> > Linux NTFS maintainer / IRC: #ntfs on irc.openprojects.net
> > WWW: http://linux-ntfs.sf.net/, http://www-stu.christs.cam.ac.uk/~aia21/
> >
> > ===================================================================
> >
> > This will update the following files:
> >
> >  fs/ntfs/dir.c |    3 ++-
> >  1 files changed, 2 insertions(+), 1 deletion(-)
> >
> > through these ChangeSets:
> >
> > <aia21@cantab.net> (02/07/27 1.479)
> >    fs/ntfs/dir.c: Use PAGE_CACHE_MASK_LL() on 64-bit values.
> >
> >
> > diff -Nru a/fs/ntfs/dir.c b/fs/ntfs/dir.c
> > --- a/fs/ntfs/dir.c   Sat Jul 27 14:24:09 2002
> > +++ b/fs/ntfs/dir.c   Sat Jul 27 14:24:09 2002
> > @@ -1232,7 +1232,8 @@
> >       ntfs_debug("Handling index buffer 0x%Lx.",
> >                       (long long)bmp_pos + cur_bmp_pos);
> >       /* If the current index buffer is in the same page we reuse the 
> page. */
> >
> > -     if ((prev_ia_pos & PAGE_CACHE_MASK) != (ia_pos & PAGE_CACHE_MASK)) {
> > +     if ((prev_ia_pos & PAGE_CACHE_MASK_LL) !=
> > +                     (ia_pos & PAGE_CACHE_MASK_LL)) {
> >               prev_ia_pos = ia_pos;
> >               if (likely(ia_page != NULL))
> >                       ntfs_unmap_page(ia_page);
>
>
>Hmm.  Wouldn't
>prev_ia_pos >> PAGE_CACHE_SHIFT != ia_pos >> PAGE_CACHE_SHIFT
>work just as well?  And be some safer as the result could be stored in
>32bits?

No it couldn't necessarily. (Althought we would have refused to open the 
directory if it would be but I would like to see those kinds of limits 
removed.)

Yes, the shifts would do the same but they would generate more inefficient 
code (this is a completely unverified and possibly wild assumption).

Best regards,

Anton


-- 
   "I've not lost my mind. It's backed up on tape somewhere." - Unknown
-- 
Anton Altaparmakov <aia21 at cantab.net> (replace at with @)
Linux NTFS Maintainer / IRC: #ntfs on irc.openprojects.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/


      reply	other threads:[~2002-07-28 18:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-27 13:46 Anton Altaparmakov
2002-07-28 18:03 ` Eric W. Biederman
2002-07-28 19:00   ` Anton Altaparmakov [this message]

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=5.1.0.14.2.20020728195634.042be2a0@pop.cus.cam.ac.uk \
    --to=aia21@cantab.net \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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®